Minishell is a simplified shell program developed as part of the 42 school curriculum. It is designed to understand and execute basic shell commands, handle environment variables, and manage processes.
- Command execution
- Redirection and pipes
- Environment variable support
- Signal handling
- Basic error handling
- GCC compiler
- Make
- libft (your personal library or the school's standard library)
- Clone the repository:
git clone https://github.com/Vaache/minishell.git cd minishell
- Build the project:
make readline; make
- Run the Minishell executable:
./minishell
- Execute a command:
ls -l
- Redirect output to a file:
ls > output.txt
- Use pipes:
ls -l | grep .txt
Minishell supports the following built-in commands:
echo
cd
pwd
export
unset
env
exit
Additional Features Command Line Editing: Add line editing capabilities with features like history, arrow key navigation, and editing. Tab Completion: Support tab completion for commands and file paths.
-
- && and ||: Implement the logical operators
&&
and||
to allow chaining of commands based on the success or failure of previous commands.
command1 && command2 # Execute command2 only if command1 succeeds command1 || command2 # Execute command2 only if command1 fails
- && and ||: Implement the logical operators
- Command Grouping with (): Allow command grouping using parentheses to change the precedence of execution.
(command1 && command2) || command3
Include comprehensive test cases to ensure the correctness and robustness of your shell. Use a test suite or framework to automate testing. Performance Optimization Optimize the performance of your shell, especially for handling large inputs and executing complex commands. This section suggests the addition of logical operators && and || for command chaining based on success or failure and the use of parentheses for command grouping to change the precedence of execution. Feel free to further customize or expand this section based on specific implementation details or additional features you've included in your Minishell project.