Skip to content

Albab-Hasan/Ash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ash Shell

A modern Unix shell written in Rust with async/await support using Tokio.


Fully Implemented Features

Here are the features I'm confident are fully implemented and stable:

Core Shell Functionality

  • Command execution - Run any external command
  • Pipelines - Chain commands with | (e.g., ls | grep foo | wc -l)
  • I/O Redirections - >, >>, <, 2>, &>
  • Background jobs - Run commands in background with &
  • Command chaining - ;, &&, || operators
  • Glob expansion - *, ?, [...] patterns

Built-in Commands

  • cd, pwd, echo, exit
  • export, unset (environment variables)
  • alias, unalias (command aliases)
  • jobs, fg, bg, kill (job control)
  • help

Interactive Features

  • Syntax highlighting - Real-time colorization as you type
  • Autosuggestions - Ghost text from command history
  • Tab completion - Commands, files, and paths
  • Command history - Saved to ~/.ash_history
  • Configuration file - ~/.ashrc.toml

Things to try out

# Run some commands
ls -la | grep ".rs"
echo "Hello, World!" > hello.txt
cat hello.txt

# Try background jobs
sleep 5 &
jobs
fg %1

# Set up aliases
alias ll="ls -la"
ll

# Variable expansion
export NAME="Ash"
echo "Hello, $NAME"

Build Instructions

Requirements

  • Unix-like OS (Linux, macOS, BSD, or WSL)
  • Rust 1.70+ with Cargo

Quick Build

# Clone the repository
git clone https://github.com/yourusername/ash.git
cd ash

# Quick install
./install.sh

Install to PATH

# Option 1: Copy to ~/.local/bin
mkdir -p ~/.local/bin
cp target/release/ash ~/.local/bin/
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc

# Option 2: Use cargo install
cargo install --path .

Set Up Configuration

cp ashrc.toml.example ~/.ashrc.toml
# Edit ~/.ashrc.toml to customize settings

License

MIT

About

A modern Unix shell written in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published