A shell inspired by bash, developed as part of the 42 curriculum. This shell interprets and executes commands, handles pipes and redirections, and includes a set of built-in commands.
This project was developed collaboratively by @alejandquintero and @lgandarillas.
Minishell is designed to:
- Parse and execute commands with arguments.
- Handle absolute, relative, and environment paths.
- Provide support for pipes (
|
) and redirections (<
,>
,>>
,<<
). - Include environment variable handling (
$VAR
and$?
). - Support interactive shell control with
Ctrl-C
,Ctrl-D
, andCtrl-\
.
-
Clone the repository and submodules
git clone https://github.com/lgandarillas/minishell.git
cd minishell
git submodule update --init --remote libft_v2
-
Install Dependecies
sudo apt update sudo apt install libreadline-dev
-
Compile the project:
make
-
Run the shell:
./minishell
Minishell implements the following built-in functions directly without external executables:
echo
,cd
,pwd
,export
,unset
,env
,exit
- Quoting: Supports single (
'
) and double ("
) quotes for string handling. - History: Tracks command history during the session.
- Signals: Handles
Ctrl-C
,Ctrl-D
, andCtrl-\
like bash. - Environment Variables: Expands
$VAR
and includes support for$?
(last exit status).