How shigosag/mini-shell works
Mini Shell is an interactive C command-line shell. Its principal runtime path is the user entering a line, the shell handling its loop-level exit/clear cases or dispatching it to command handling, and command handling invoking built-ins or passing other input to the host system. Parsing and history/logging are additional capabilities. The README describes an executor stage, but the sampled command handler parses and discards the parsed result; the separate executor implementation was not excerpted, so its runtime role is uncertain.
Main entry points: command.c Command handler · shell.c Interactive shell · history.c Command history · main.c Program entry
Components 10
Shell Interface
- Program entry
src/main.c - Interactive shell
src/shell.c
Command Handling
- Command handler
src/command.c - Input parser
src/parser.c - Command executor
src/executor.c
Shell Services
- Command history
src/history.c - Command logger
src/logger.c
Other components
- Shell user
- Host command system
- Terminal output
Connections 10
- Shell user → Interactive shell: enters commands
README.md - Program entry → Interactive shell: starts shell
src/main.c - Interactive shell → Shell user: reads input
src/shell.c - Interactive shell → Command handler: dispatches input
src/shell.c - Command handler → Input parser: parses input
src/command.c - Command handler → Host command system: runs raw command
src/command.c - Command handler → Command history: records command
src/command.c - Command handler → Command history: shows history
src/command.c - Command handler → Command logger: logs command
src/command.c - Interactive shell → Terminal output: prints interface
src/shell.c