42 Unix project. The code is written in accordance with The Norm (42 coding style).
The project was done in a team with Elena Kiseleva, it contains lots of parsing, signal and error handling and process management (fork, execve, etc.).
- navigate through command history using up and down arrows (done using termcap);
- modification of current or previous commands using backspace (not supports movement with left and right arrows);
- ctrl-C, ctrl-D and ctrl-\ signals;
- $?;
- environment variables;
- pipes (except for multiline commands);
- >, < and >> redirections (except for file descriptor aggregation);
- semicolon;
- single, double quotes and \;
- builtins commands :
echowith-noption;cdwith relative or absolute path;pwd,export,unsetandexitwithout any options;envwithout any options and any arguments;
- external commands launch through execve.
In the root of repository run make and launch executable -- ./minishell.
builtinsfolder -- builtins commands code.envpfolder -- code for manipulating envp array/list.parserfolder -- code for parsing and launching (where all the magic happens, basically).readlinefolder -- reading via termcap.utilsfolder -- utils functions (some from own C library, some specific for project).
Makefile
make-- compilesminishellexecutable.clean-- deletes object files.fclean-- deletes object files andminishell.re-- runsfcleanand recompiles.
