How table-en4/minishell works
This repository is an interactive Unix shell: it reads commands, prepares a minibox representation, then executes commands while maintaining shell environment and status. Its command-processing stages include input setup, lexing, parsing (including expansion, wildcard handling, and redirections), and AST execution; shell builtins, configuration/aliases, and signal handling are distinct capabilities. The graph uses sampled code and the source index; several subsystem connections are omitted where their callers were not shown.
Main entry points: main.c Shell loop · build.c Command lifecycle · excute_minibox.c AST dispatcher · build_parsing.c AST and syntax
Components 22
Shell runtime
- Shell loop
srcs/main.c - Environment state
srcs/builtins/env_init.c - Config and aliases
srcs/config/config.c - Signal handling
srcs/signals_setup.c
Command construction
- Command lifecycle
minibox/srcs/build.c - Input setup
minibox/srcs/build_input.c - Lexing
minibox/srcs/build_lexing.c - AST and syntax
minibox/srcs/build_parsing.c - Argument expansion
minibox/srcs/build_parsing_arguments_expand.c - Wildcard expansion
minibox/srcs/build_parsing_arguments_wildcard.c - Redirections and heredoc
minibox/srcs/build_parsing_redirection_heredoc.c
Execution
- AST dispatcher
srcs/pipex/excute_minibox.c - Command execution
srcs/pipex/exec_command.c - Pipeline execution
srcs/pipex/exec_pipe.c - External processes
srcs/exec_extern.c - Shell builtins
srcs/builtins/ft_export.c - Environment builtins
srcs/builtins/ft_unset.c
Libft utilities
- Libft
Libft/incs/libft.h - Formatted output
Libft/srcs/ft_dprintf/ft_dprintf.c - Line reader
Libft/srcs/get_next_line/get_next_line.c
Other components
- Shell user
- Readline input
Connections 21
- Shell user → Readline input: enters commands
- Readline input → Shell loop: provides input
- Shell loop → Environment state: initializes
srcs/main.c - Shell loop → Config and aliases: loads config
srcs/main.c - Shell loop → Signal handling: sets up
srcs/main.c - Shell loop → Command lifecycle: builds command
srcs/main.c - Shell loop → AST dispatcher: executes command
srcs/main.c - Command lifecycle → Input setup: prepares input
- Command lifecycle → Lexing: builds tokens
- Command lifecycle → AST and syntax: builds AST
- AST and syntax → Argument expansion: expands arguments
minibox/srcs/build_parsing.c - AST and syntax → Redirections and heredoc: builds redirections
minibox/srcs/build_parsing.c - Argument expansion → Wildcard expansion: expands patterns
- AST dispatcher → Pipeline execution: dispatches pipelines
- Pipeline execution → AST dispatcher: executes AST sides
srcs/pipex/exec_pipe.c - AST dispatcher → Command execution: dispatches commands
- Command execution → External processes: runs external
- Command execution → Shell builtins: runs builtins
- Environment builtins → Environment state: updates variables
srcs/builtins/ft_unset.c - Shell loop → Formatted output: reports status
srcs/main.c - Shell loop → Libft: uses utilities