Skip to content

This project is about creating a simple shell. Yes, your own little bash. You will learn a lot about processes and file descriptors.

Notifications You must be signed in to change notification settings

MVPee/42-minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

:shipit: 42-minishell

GitHub code size in bytes Code language count GitHub top language GitHub last commit

💡 About

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.

🚀 Running

You need to install readline

sudo apt-get update
sudo apt-get install libreadline-dev
make run

It will automatically compile the project and run it.

./minishell

Will launch the previously compiled project with make and run it.


📜 Features

  • 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
    -- echo with -n option
    -- cd with relative, absolute, and - ($OLDPWD) paths
    -- pwd
    -- export
    -- unset
    -- env
    -- exit

  • Others
    -- $SHLEVEL
    Increments SHLVL by one. Sets it to one if SHLVL is invalid (not between 1 and 999)
    -- $PWD
    Updates PWD to reflect the current directory after a cd command or if no PWD is present in the environment
    -- $OLDPWD
    Updates OLDPWD after a cd command or if no OLDPWD is present in the environment
    -- Prompt
    A beautiful, colorful prompt that displays the current PWD at the beginning


This group project was done by MVPee and Nour Echaara

About

This project is about creating a simple shell. Yes, your own little bash. You will learn a lot about processes and file descriptors.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published