How moumniucf/minishell works
Minishell is a custom interactive shell. Its principal workflow reads a command line, checks and tokenizes shell syntax, expands variables and parses tokens into command segments, then executes built-ins or external programs with redirection and pipes. The graph also preserves environment management and signal handling as distinct capabilities. README statements support the high-level workflow and documented features; sampled source confirms token parsing, redirection handling, and built-in dispatch. Some unsampled implementation links are therefore documented rather than source-verified.
Main entry points: parss_er.c Command parsing · exec.c Execution control · builtins.c Built-in dispatch · pro_mpt.c Prompt and input
Components 20
Input and parsing
- Prompt and input
minishell/parss/pro_mpt.c - Syntax checks
minishell/parss/syntax_err.c - Tokenization
minishell/minishell.h - Quote expansion
minishell/parss/handl_qs.c - Variable expansion
minishell/parss/expa_nd.c - Redirections
minishell/parss/help_norm_1.c - Here-documents
minishell/parss/herdoc_handle.c - Command parsing
minishell/parss/parss_er.c
Command execution
- Execution control
minishell/exec/exec.c - Built-in dispatch
minishell/exec/builtins.c - Built-in commands
minishell/exec/echo.c - External commands
minishell/exec/exec_utils.c - Pipes and processes
minishell/exec/exec_utils1.c
Shell state
- Environment state
minishell/exec/env.c - Environment built-ins
minishell/exec/export.c - Directory built-ins
minishell/exec/cd.c
Runtime behavior
- Signal handling
minishell/exec/signal.c
Other components
- Shell user
- Terminal signals
- Command result
Connections 21
- Shell user → Prompt and input: enters commands
- Prompt and input → Syntax checks: checks syntax
- Syntax checks → Tokenization: accepts input
minishell/parss/syntax_err.c - Tokenization → Command parsing: parses tokens
minishell/parss/parss_er.c - Command parsing → Quote expansion: handles quotes
minishell/parss/parss_er.c - Command parsing → Variable expansion: expands variables
minishell/parss/parss_er.c - Command parsing → Redirections: handles redirects
minishell/parss/parss_er.c - Command parsing → Here-documents: uses here-docs
minishell/parss/parss_er.c - Command parsing → Execution control: produces commands
- Execution control → Built-in dispatch: dispatches built-ins
- Built-in dispatch → Built-in commands: calls commands
minishell/exec/builtins.c - Execution control → External commands: runs programs
- Execution control → Pipes and processes: manages pipes
- Variable expansion → Environment state: reads variables
- Environment built-ins → Environment state: updates environment
minishell/exec/export.c - Directory built-ins → Environment state: updates directory state
minishell/exec/cd.c - Built-in dispatch → Environment built-ins: dispatches commands
- Built-in dispatch → Directory built-ins: dispatches commands
- Terminal signals → Signal handling: raises signals
- Signal handling → Prompt and input: handles interrupts
- Execution control → Command result: produces status