Project Structure - alteixeira20/42_minishell GitHub Wiki
This page showcases the source code organization of the MiniShell
project.
minishell/
├── src/
│ ├── main.c
│ ├── init/
│ ├── parser/
│ ├── tokenizer/
│ ├── env/
│ ├── execution/
│ ├── builtins/
│ ├── redirection/
│ ├── signals/
│ ├── error/
│ └── cleanup/
├── libft/
└── Makefile
Folder | Description |
---|---|
src/ |
All project source code |
main.c |
Entry point with main loop and user input handling |
init/ |
Shell context and environment initialization |
parser/ |
Input parsing, quote-aware variable expansion, syntax validation |
tokenizer/ |
Lexical analysis: word/symbol extraction and token list creation |
builtins/ |
Builtin commands (cd , echo , export , exit , etc.) and dispatcher logic |
env/ |
Environment variable utilities (get, set, copy, sort) |
exec/ |
Execution engine: command building, forking, pipelines, signals |
redirects/ |
Handles < , > , >> , << ; heredoc forking and temp file management |
signals/ |
Signal setup and restoration across shell, heredocs, and child processes |
error/ |
Unified error messaging system with g_exit propagation |
cleanup/ |
Memory-safe resource cleanup for all major structs and runtime data |