This project is a simple custom shell written in Rust. It provides basic command-line functionality, including:
- Running system commands (e.g.,
ls,cat, etc.) - Piping commands using
| - Changing directories with
cd - Viewing and modifying the shell's
PATHvariable withshowpathandaddpath - Exiting the shell with
exit
- Cross-platform: Handles path separators for both Windows and Unix-like systems.
- Custom PATH management: Use
showpathto display the currentPATH, andaddpath <path>to append a new directory. - Basic piping: Supports simple command piping (e.g.,
ls | grep txt). - Directory navigation: Use
cd <dir>to change the current working directory.
Run the shell with:
cargo run --bin my_shellExample commands inside the shell:
my shell > showpath
my shell > addpath C:/My/Custom/Path
my shell > cd C:/Users/YourName
my shell > ls -l | grep .rs
my shell > exit- The shell is for educational purposes and demonstrates basic process and environment management in Rust.
- Some advanced shell features (like background jobs, advanced piping, or scripting) are not implemented.
Example commands inside the shell:
my shell > showpath
my shell > addpath C:/My/Custom/Path
my shell > cd C:/Users/YourName
my shell > ls -l | grep .rs
my shell > exit- The shell is for educational purposes and demonstrates basic process and environment management in Rust.
- Some advanced shell features (like background jobs, advanced piping, or scripting) are not implemented.