This project has been created as part of the 42 curriculum by weizhang and fdong.
Minishell is a simple shell written in C. It is a subset of bash --posix.
- Display a prompt and maintain a working history
- Search and launch executables based on
PATHor relative/absolute paths - Handle single quotes
'and double quotes" - Redirections:
<,>,>>,<<(heredoc) - Pipes
| - Environment variable expansion (
$VAR,$?) - Signal handling:
ctrl-C,ctrl-D,ctrl-\behave like in bash - Logical operators
&&,||with parentheses for priorities - Built-in commands:
echo -n,cd,pwd,export,unset,env,exit
make # Build the minishell executable
make bonus # Build the minishell executable
make clean # Remove object files
make fclean # Remove object files and the executable
make re # Rebuild from scratch./minishellmake testvalgrind --suppressions=readline.supp --show-leak-kinds=all --leak-check=full ./minishellAI tools were used during this project for the following purposes:
- Code review -- checking for bugs, edge cases, and norm compliance
- Design discussions -- discussing architecture choices (e.g. Pratt parsing vs recursive descent, AST design)
- Writing the README -- drafting and formatting this document
- Understanding system calls -- getting explanations for
fork,execve,pipe,dup2,waitpid,sigaction, etc.
All code was written and understood by the team. AI was not used to generate shell logic or implementation code.