A minimal UNIX-like shell implemented in Rust.
This project is both a learning journey and an attempt to design a practical, extensible shell from scratch.
tiny-shell-rs emphasizes the following principles:
- Extensibility: Modular architecture for easy function addition and replacement
- Testability: Core logic designed with unit and integration testing in mind
- Consistency: Uniform conventions for code structure, CLI behavior, and error reporting
- See Design Document for architecture and module-level details.
- Clone the repository
- (Optional) Rename
.tinyshrc.sampleto.tinyshrcand place it in your home directory - (Optional) Adjust configuration values as needed (or skip — defaults will apply)
cargo run- Basic command execution (e.g.,
ls,echo) - Built-in commands (e.g.,
cd,exit,help) - Path resolution (
commandvs./command) - Piping (
command1 | command2 | command3) - Redirection (
command > file,command < file) - Command history
- Configuration file loading (
.tinyshrc— ini-like format) - Environment variable management (
export,unset) - Environment variable expansion (
$HOME,${VAR}) - Tilde expansion (
~/path)
These features are currently being designed or prototyped:
- Wildcard/glob expansion (
**/*.txt) - Command substitution (
$(command)) - Background execution (
command &) - Job control (
jobs,fg,bg) - Signal handling (Ctrl+C interrupt, SIGTSTP, etc.)
- Auto-completion and suggestions