Skip to content
/ 42sh Public

42 shell school project, support for job-control, shell script, globbing, aliases, ..

License

Notifications You must be signed in to change notification settings

uael/42sh

Repository files navigation

42sh

Build Status

Grade:

125/100 (outstanding project * 5)

Subject:

Subject

Mandatory part:

  • Prompt without line edition.
  • Builtins cd, echo, exit, env, setenv, unsetenv with there options.
  • Executing simple commands with there parameters using PATH.
  • Support for redirection >, >>, <and |.
  • Logical operand &&and ||.
  • Separator ;.

Optional feature (five of theses are mandatory to validate the project):

  • Inhibitors ", 'and \.
  • Advanced redirections: aggregation of file output and heredoc <<.
  • Globbing: *, ?, [], {}, etc.
  • Backquotes `.
  • Subshell with operand ().
  • Local variable and builtin unset and export.
  • History with builtin historyand ! with options.
  • Advanced line edition.
  • File descriptors and builtin read with options.
  • Dynamical autocompletion.

Optional feature highly appreciated:

  • Job Control and builtins job, fg, bg and operand &.
  • Shell Scripting: bang (!), variable assignements, brace group, if, while, until, for and functions

Bonuses

  • Advanced dollar expansion $(..), $((..)), $[..]
  • Tilde expansion ~, ~<username>, ~-, ~+
  • Range expansion {<START>..<END>} and {<START>..<END>..<INCREMENT>}
  • Advanced redirections operator &>, &>>, <>, <<< and |&
  • Aliases, builtin alias alias [-p] [name[=value] …] and expansion
  • Builtin env advanced options -u name and [name=value]
  • Inline variables [name=value] binary [arguments...]
  • Binary hashtable
  • Rights in the PATH

Usage

Usage: ./42sh [option] [script-file] [script arguments...]
ush options:
	--help: this *useful* help message!
ush keymap:
	<ctrl+A|home>: Go to begin of line.
	<ctrl+E|end>: Go to end of line.
	<ctrl+V>: Enter visual mode.
	<ctrl+Y>: Yank in visual mode.
	<ctrl+P>: Paste.
	<ctrl+D>: Exit or delete in visual mode.
	<ctrl+C>: Cancel line edition.
	<ctrl+L>: Clear the screen.
	<shift+[left|right]>: Move per word.
	<shift+[up|down]>: Move per line.
	<up>: Go up in the history.
	<down>: Go down in the history.
	!!: Retype the last command.
	!n: Retype the n command from the begin of history.
	!-n: Retype the -n command from the last command.
	!name: Search for a command beginning with name.

About

42 shell school project, support for job-control, shell script, globbing, aliases, ..

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •