ru-sh is a custom shell implementation written in Rust. It provides basic shell functionalities such as navigating directories, managing files, and executing commands. The shell is designed to mimic the behavior of traditional Unix shells while offering a simple and extensible codebase.
- Command Execution: Supports built-in commands like
ls,cd,pwd,echo,cat,mkdir,rm,cp,mv, andclear. - Directory Navigation: Navigate directories using
cdand view the current directory withpwd. - File Operations: Perform file and directory operations such as copying (
cp), moving (mv), creating (mkdir), and removing (rm). - File Viewing: Display file contents using
cat. - Command History: Maintains a history of executed commands, saved in
~/.rushistory.
- Ensure you have Rust installed.
- Clone the repository:
git clone https://github.com/heshamalmosawi/ru-sh.git cd ru-shell
- Build the project:
cargo build --release
- Start
ru-shelllocally:target/release/ru-shell
- Install the shell globally:
cargo install --path . - Start
ru-shellglobally:ru-shell
Once inside the shell, you can start typing commands. For example, to list files in the current directory, simply type ls and press Enter.