As beautiful as a shell
This project is about creating a simple shell. Yes, your own little bash. You will learn a lot about processes and file descriptors.
You need to install readline
sudo apt-get update
sudo apt-get install libreadline-dev
make runIt will automatically compile the project and run it.
./minishellWill launch the previously compiled project with make and run it.
-
History
-- Working history -
\
-- Supports escaping characters with backslashes for proper command interpretation -
'"
-- Supports proper parsing of single and double quotes for string handling -
Redirections
-- Supports input (<), here-doc (<<), output (>), and append (>>) redirections -
Environnemts variables
-- Supports retrieving, setting, and expanding environment variables -
$?
-- Displays the exit status of the last executed command -
Signals
-- Handles signals like CTRL-C (interrupt), CTRL-D (EOF), and CTRL-\ (quit) -
Builtins
--echowith -n option
--cdwith relative, absolute, and- ($OLDPWD)paths
--pwd
--export
--unset
--env
--exit -
Others
--$SHLEVEL
IncrementsSHLVLby one. Sets it to one ifSHLVLis invalid (not between 1 and 999)
--$PWD
UpdatesPWDto reflect the current directory after acdcommand or if noPWDis present in the environment
--$OLDPWD
UpdatesOLDPWDafter acdcommand or if noOLDPWDis present in the environment
-- Prompt
A beautiful, colorful prompt that displays the currentPWDat the beginning
This group project was done by MVPee and Nour Echaara
