How sussyback99/rish works
rish is a small interactive Unix shell. Its main loop loads history, repeatedly renders a prompt and reads a line, parses it, then handles built-in commands; on exit it saves history. The single source file contains the prompt, raw terminal input and history-based suggestions, parsing, and inline command handling. The README documents these capabilities, while the sampled source confirms their implementation. Components share that file; edges cite it where the caller or interaction is visible.
Main entry points: rish.cpp Shell loop
Components 13
Interactive shell
- Shell loop
rish.cpp - Dynamic prompt
rish.cpp - Raw input
rish.cpp - History suggestions
rish.cpp - Command parser
rish.cpp
Built-in commands
- print command
rish.cpp - CWD output
rish.cpp - who command
rish.cpp - cd command
rish.cpp - exit command
rish.cpp
Command history
- History file
rish.cpp
Other components
- User
- Terminal
Connections 18
- User → Terminal: enters commands
README.md - Terminal → Raw input: provides keystrokes
rish.cpp - Raw input → Terminal: echoes input
rish.cpp - Shell loop → Dynamic prompt: renders
rish.cpp - Shell loop → Raw input: reads line
rish.cpp - Raw input → History suggestions: finds matches
rish.cpp - History suggestions → History file: searches entries
rish.cpp - Shell loop → History file: loads and saves
rish.cpp - Shell loop → Command parser: parses line
rish.cpp - Shell loop → print command: dispatches print
rish.cpp - Shell loop → who command: dispatches who
rish.cpp - Shell loop → cd command: dispatches cd
rish.cpp - Shell loop → exit command: dispatches exit
rish.cpp - print command → CWD output: prints directory
rish.cpp - print command → Terminal: writes output
rish.cpp - who command → Terminal: writes UID
rish.cpp - cd command → Shell loop: changes working directory
rish.cpp - exit command → History file: triggers save
rish.cpp