42sh is the last shell project of 42. This project aims to introduce us to the development of a shell. It's a group project that I realized with 4 people. We chose to make a posix bash style shell
run make && ./42sh
- simple command (example:
ls) - environement variable (example:
$PATH) - local variable (example:
a=b; echo ${a}) - signal management (example:
CTRL-C) - job control (example:
ls &) - temporary variable (example:
HOME=/tmp cd) - simple expansion (example:
echo ${PATH}) - expansion of special parameters (example:
echo ${?})
- >
- <
- <<
- >>
- <&
- >&
- io_number
- |
- ||
- &&
- ;
- cd
- echo
- exit
- type
- set
- unset
- export
- jobs
- fg
- bg
-
LEFT AND RIGHT ARROWSmove cursor on the right or left. In select mode, move the select part -
UP AND DOWN ARROWSmove in the historic -
DELclear a character. In select mode, del the select part and exit select mode -
HOMEmove to the beginning of the line -
ENDmove to the end of the line -
OPT+UPmove up -
OPT+DOWNmove down -
CTRL-Cprint new prompt -
CTRL-Ddel on the right if line in not empty otherwise leaves the shell -
OPT-Bmove to previous word -
OPT+Fmove to next word -
OPT+Vpast the copy line -
OPT+Center in select mode. In select mode, copy the select part and exit select mode -
OPT+Xenter in select mode. In select mode, cut the select part and exit select mode
- quoting ” (double quote), ’ (simple quote) et \ (backslash)
- pattern matching (globing) : *, ?, [], !
- tilde expansions and additional formats of parameters
- grouped command and subshell : (), {};
- command substitution : $()
- arithmetic expansion : $(())
- processus substitution : <(), >()
- complete management of the history
- dynamic completion
- Vi and Readline for the line edition
- alias and unalias buitlins
- hash builtin and hashtable for binary
- test builtin
100/100