Minishell is a mini version of a Unix shell, created as a school project with Bash as the reference shell. The goal of this project is to implement essential features of a shell environment from scratch, deepening our understanding of process creation, signal handling, and command execution.
This project was a collaborative effort, with each contributor responsible for different aspects of the shell.
- Parsing and Tokenization (Fully Implemented): Efficiently parses and tokenizes user input for command processing.
- Command Execution (Fully Implemented): Executes system commands, handling both relative and absolute paths.
- Pipes (Fully Implemented): Implements piping (|), enabling the chaining of commands.
- Redirection (Fully Implemented): Handles input (<), output (>), and append (>>) redirection.
- Environment Variables (Fully Implemented): Manages environment variables like $HOME and $USER.
- Heredoc (Collaboration): Includes partial functionality for heredoc (<<).
- Signal Handling (Collaboration): Basic signal handling (e.g., Ctrl+C and Ctrl+).
- Error Handling (Partially Implemented): Provides error management for invalid commands and syntax, with some areas still under development.
- Built-in Commands (Improved): Fixed edge cases for built-in commands (echo, cd, pwd, export, unset, env, exit).
- Initial Pipex Implementation (Fully Implemented): Provided the foundational code for pipe handling.
- Prompt (Fully Implemented): Displays a customizable shell prompt.
- Built-in Commands: echo, cd, pwd, export, unset, env, exit
- Error Handling (Partially Implemented): Provides appropriate error messages for invalid commands or incorrect usage.
- Signals (Collaboration): Implements signal handling (e.g., Ctrl+C, Ctrl+) to manage shell behavior.
- Heredoc (Collaboration): Includes partial functionality for heredoc (<<).
- Clone the repository:
git clone [email protected]:k2matu/minishell.git
- Navigate into the directory:
cd minishell
- Compile the library using make:
make
- Run the shell:
./minishell
Once the shell is running, you can execute commands similarly to Bash!