Rush Shell v0.8.0
A comprehensive POSIX sh-compatible shell implementation written in Rust
Rush is a feature-rich Unix shell that combines the reliability and safety of Rust with full POSIX compliance. Built from the ground up with performance, security, and maintainability in mind.
๐ Quick Start
Interactive Mode
./target/release/rush-sh
Start the shell in interactive mode with a modern prompt
Script Mode
./target/release/rush-sh script.sh
Execute commands from a file
Command Mode
./target/release/rush-sh -c "echo Hello World"
Execute a single command string
โจ Key Features
Full POSIX Compliance
Implements IEEE Std 1003.1-2008 with comprehensive support for shell grammar, built-in utilities, and standard behavior
View Compliance Status โHigh Performance
Leverages Rust's zero-cost abstractions for optimal execution speed while maintaining memory safety
View Benchmarks โMemory Safe
Built with Rust's ownership system ensuring no memory leaks, data races, or segmentation faults
Modern Interface
Enhanced with colors, tab completion, and intelligent prompt with condensed directory display
Rich Feature Set
32 built-in commands, advanced expansions, control structures, and comprehensive variable support
Explore Features โThoroughly Tested
499+ test functions covering all components with comprehensive edge case and error condition coverage
๐ What's New
Job Control
Full POSIX-compliant job control with background execution (&), job listing (jobs), foreground/background control (fg/bg), job termination (kill), wait for jobs (wait), and $! special variable for last background PID
Subshell Support
Full POSIX-compliant subshells with state isolation, exit code propagation, trap inheritance, and depth limit protection (60+ test cases)
File Descriptor Operations
Complete FD table management with duplication (N>&M, N<&M), closing (N>&-, N<&-), and read/write operations (30+ test cases)
Here-documents & Here-strings
Full implementation of << and <<< with proper expansion handling for multi-line and single-line input redirection
Enhanced Trap System
Signal normalization, multiple handlers, trap display/reset, and signal queue with overflow protection
๐ฏ Getting Started
Build the Project
git clone https://github.com/drewwalton19216801/rush-sh.git
cd rush-sh
cargo build --release
Start Interactive Shell
./target/release/rush-sh
Try Basic Commands
echo "Hello, Rush!"
ls -la
pwd