📦 Installation Guide
Get Rush Shell up and running on your system in minutes
🛠️ Prerequisites
Rust
Rush requires Rust edition 2024 or later. Install Rust using rustup.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Cargo
Cargo is included with Rust and is used to build Rush Shell.
cargo --version
System Dependencies
Rush requires standard C library and system headers for Unix interactions.
📥 Installation Methods
Build from Source (Recommended)
Latest FeaturesClone the Repository
git clone https://github.com/drewwalton19216801/rush-sh.git
cd rush-sh
Build in Release Mode
cargo build --release
The binary will be available at target/release/rush-sh
Optional: Install Globally
cargo install --path .
This installs Rush to ~/.cargo/bin/rush-sh
Cargo Install
Easy InstallDocker
ContainerizedClone and Build in Docker
git clone https://github.com/drewwalton19216801/rush-sh.git
cd rush-sh
docker run -it -v $(pwd):/app -w /app rust:latest cargo build --release
✅ Verification
Check Installation
./target/release/rush-sh --version
You should see version information displayed.
Test Interactive Mode
./target/release/rush-sh
You should see a prompt like: /h/d/p/r/rush-sh $
Run Basic Commands
echo "Hello, Rush!"
pwd
ls -la
⚙️ Configuration
~/.rushrc Configuration File
Rush automatically sources ~/.rushrc
on startup for customization.
Example ~/.rushrc
# Set environment variables
export EDITOR=vim
export PATH="$HOME/bin:$PATH"
# Create useful aliases
alias ll='ls -la'
alias ..='cd ..'
alias grep='grep --color=auto'
# Set custom variables
MY_PROJECTS="$HOME/projects"
WORKSPACE="$HOME/workspace"
# Display welcome message
echo "Welcome to Rush shell!"
echo "Type 'help' for available commands."
Configuration Features
Environment Variables
Set default variables and export them to child processes
Aliases
Define command shortcuts that persist across sessions
PATH Configuration
Customize PATH and other shell environment settings
Initialization
Run setup commands and display custom welcome messages
🔧 Development Setup
Development Build
# Debug build (faster compilation)
cargo build
# Development run
cargo run
# Run with custom command
cargo run -- -c "echo hello"
Testing
# Run all tests
cargo test
# Run specific test modules
cargo test lexer
cargo test parser
cargo test executor
# Run with output capture
cargo test -- --nocapture
Benchmarking
# Run benchmarks
cargo run -p rush-benchmarks
# View HTML report
python3 -m http.server 8000 -d target/
# Visit http://localhost:8000/benchmark_report.html
🔍 Troubleshooting
Build Errors
Problem: Compilation fails with missing dependencies
Solution: Update Rust and ensure all system dependencies are installed
rustup update stable
sudo apt-get install build-essential # Ubuntu/Debian
sudo yum groupinstall "Development Tools" # RHEL/CentOS
Permission Denied
Problem: Cannot execute the binary
Solution: Make sure the binary has execute permissions
chmod +x target/release/rush-sh
Colors Not Working
Problem: Colors don't display in terminal
Solution: Check terminal capabilities and Rush color settings
# Force enable colors
export RUSH_COLORS=on
# Disable colors for accessibility
export NO_COLOR=1
Tab Completion Issues
Problem: Tab completion not working
Solution: Ensure you're using an interactive terminal that supports readline
# Tab completion works in interactive mode
./target/release/rush-sh
# Not available in script mode
./target/release/rush-sh script.sh