- Process Spawning: Uses
std::process::Commandto execute system binaries. - Piping (
|): Supports chaining multiple commands together, passing thestdoutof one process into thestdinof the next. - I/O Redirection:
- Output Redirection (
>): Writes command output to a specified file. - Input Redirection (
<): Reads command input from a specified file.
- Output Redirection (
- Built-in Commands:
cd: Changes the current working directory usingstd::env.exit: Terminates the shell session.
- Signal Handling: Integrates
ctrlccrate to handleSIGINT(Ctrl+C) gracefully, ensuring the shell doesn't crash and remains interactive. - State Management: Uses a Read-Eval-Print Loop (REPL) and tracks
Childprocesses to manage pipeline execution.
- Rust Toolchain: (rustc, cargo)
- Crate Dependencies:
ctrlc = "3.4"(ensure this is in yourCargo.toml)