How mharcerz/microshell works
Microshell is a small interactive Linux shell. Its main workflow is to show a user-and-directory prompt, read a command with Readline, split it into arguments, and either handle a supported command or run an external program. The README also advertises command history, completion, colored output, signal handling, and quoted arguments. The source excerpt confirms the prompt, history, parsing, signal setup, and external execution; omitted portions prevent verifying the internal dispatch paths for individual built-ins.
Main entry points: microshell.c Shell loop
Components 13
Interactive shell
- Shell loop
microshell.c - Prompt and identity
microshell.c - Readline input
microshell.c - Command history
microshell.c - Syntax completion
microshell.c
Command handling
- Argument parser
microshell.c - Shell built-ins
microshell.c - Cut command
microshell.c - Calendar command
microshell.c - Help output
microshell.c
System execution
- Signal handling
microshell.c - External programs
Other components
- Shell user
Connections 12
- Shell user → Shell loop: starts shell
README.md - Shell loop → Prompt and identity: shows prompt
microshell.c - Shell loop → Readline input: reads command
microshell.c - Readline input → Command history: records input
microshell.c - Readline input → Syntax completion: supports completion
README.md - Shell loop → Argument parser: splits command
microshell.c - Argument parser → Shell built-ins: dispatches command
microshell.c - Shell built-ins → Cut command: dispatches cut
microshell.c - Shell built-ins → Calendar command: dispatches cal
microshell.c - Shell built-ins → Help output: prints help
microshell.c - Argument parser → External programs: executes unsupported
microshell.c - Shell loop → Signal handling: registers signals
microshell.c