This project has been created as part of the 42 curriculum by zotaj-di, baelgadi.
MiniDevil is a POSIX inspired shell written in C as part of the 42 school minishell project.
It reads commands from the terminal, tokenizes & parses them into an AST (Abstract Syntax Tree) then executes the tree: handling pipes, redirections, environment variables and more, just like bash.
- Interactive prompt with command history (readline)
- PATH based executable search and absolute OR relative path execution
- Single and double quote handling:
'prevents all interpretation"allows for$expansion
- Redirections:
<(input)>(output)>>(append)<<(heredoc)
- Pipes (
|) connecting STDOUT to STDIN across commands - Environment variable expansion (
$VAR,$?...) - Signal handling:
CTRL C(new prompt)CTRL D(exit)CTRL \(ignored)
- Builtins:
echo,cd,pwd,export,unset,env,exit
&&and||operators- Parentheses
()for subshell - Wildcard
*globbing (in the current directory)
- GCC or CC compiler
- GNU Make
- readline library (
libreadline-devon Debian/Ubuntu)
# Mandatory part
make
# Bonus part
make bonus./minishell
# UI Mode (extra, not in subject)
./minishell --uimake clean # remove object and dependency files
make fclean # clean + remove binary
make re # full rebuildFurther information is provided in the documentation.
The mandatory part is fully documented with Doxygen.
You can generate it directly:
make doc
open doc/html/index.html- (Notion) Bonus part explained w/ examples
- (Notion) External functions explained (breakdown of every allowed external function)
- Bash Reference Manual (GNU)
- GNU Readline Library
- Valgrind Memcheck: Different ways to lose your memory
AI tools (Claude) were used during this project for:
- Debugging assistance and code review
- Better understand core concepts and some edge cases
- Acting as a rubber duck colleague (making sure the Doxygen comments and pages were understandable and accurate)
- Greatly improved documentation by helping correct and refine it (Doxyfile & Doxygen xml/css/shell script)
- Helping structure the bonus architecture in an efficient way


