Skip to content

πŸ¦€ A customizable Rust-powered command-line shell with alias support, Git branch awareness, colorful directory listing, and built-in commands for a personalized terminal experience.

License

Notifications You must be signed in to change notification settings

nithin-lang/didactic-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦€ Rust Shell

A minimal, customizable command-line shell written in Rust β€” with features like aliases, environment management, history, prompt customization, and fun facts about Rust on startup. 🧠✨


πŸš€ Features

  • πŸ’‘ Random Rust fun fact on launch
  • 🧠 Alias support (with save/load functionality)
  • πŸ“‚ cd, ls and environment variable handling (setenv, getenv)
  • 🧾 Shell history (auto-saved)
  • 🧰 Runs system commands cross-platform (Windows/Linux/macOS)
  • 🧠 Git branch detection in prompt (if inside a repo)
  • ✨ Colored directory listing (on Unix)
  • πŸ” Built-in commands like help, whoami-shell, shellinfo
  • 🎨 Custom prompt symbol with setprompt

πŸ“¦ Installation

1. Prerequisites

  • Rust (with cargo)
  • Git (optional, for branch detection)
  • Build tools (for your OS)

2. Clone and Build

git clone https://github.com/yourusername/rust-shell.git
cd rust-shell
cargo build --release

3. Run

cargo run

Or run the compiled executable:

./target/release/rust-shell

βš™οΈ Usage

You can run commands just like in a regular shell:

> ls
> cd my_folder
> setenv NAME Rustacean
> getenv NAME
> alias gs=git status
> gs

πŸ“œ Built-in Commands

Command Description
ls Lists directory contents (color-coded)
cd <dir> Changes directory
setenv VAR VAL Sets an environment variable
getenv VAR Gets an environment variable
alias a=b Creates an alias
save-aliases Saves aliases to aliases.txt
load-aliases Loads aliases from aliases.txt
setprompt <sym> Sets custom prompt symbol
shellinfo Displays system and shell info
whoami-shell Prints shell identity
help Lists available commands
exit Exits the shell

πŸ“ Files

  • src/main.rs - Main source code
  • aliases.txt - Saved aliases
  • history.txt - Shell history

πŸ€“ Fun Fact Sample Output

* Welcome to your custom Rust Shell! *
 Fun fact: Rust was voted the 'most loved programming language' on Stack Overflow for 7 years in a row!

πŸ–₯ Screenshot

(Optional: You can add a screenshot of the terminal interface here)


πŸ“œ License

This project is licensed under the MIT License.


🀝 Contributions

Pull requests are welcome! Feel free to open issues or feature requests.


πŸ’‘ Credits

Built with ❀️ and rustyline, git2, sysinfo, and pure Rust magic.

About

πŸ¦€ A customizable Rust-powered command-line shell with alias support, Git branch awareness, colorful directory listing, and built-in commands for a personalized terminal experience.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages