Skip to content

heisenstack/0-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐚 0-shell

   ___        _          _ _
  / _ \  ___ | |__   ___| | |
 | | | |/ _ \| '_ \ / _ \ | |
 | |_| | (_) | | | |  __/ | |
  \___/ \___/|_| |_|\___|_|_|
             0-shell

A minimalist Unix-like shell written from scratch in Rust.

✨ Features

πŸ”Ή Custom Tokenizer

  • Correctly handles spaces, quotes, and escaped characters.

πŸ”Ή Interactive Command Loop

  • $ prompt
  • Multi-line input
  • Graceful exit with Ctrl+D

πŸ”Ή File System Utilities (implemented with Rust’s standard library):

Command Description Flags / Notes
echo Prints arguments -n (no newline)
pwd Shows current directory β€”
cd Changes directory ~ (home), - (previous)
ls Lists directory contents -l, -a, -F
cat Concatenates & prints files Reads from stdin
mkdir Creates directories β€”
cp Copies files & dirs β€”
rm Removes files -r (directory)
mv Moves or renames β€”

⚑ Getting Started

πŸ”¨ Build & Run

Clone the repo and start the shell:

git clone https://learn.zone01oujda.ma/git/mdinani/0-shell.git
cd 0-shell
cargo run

You’ll see:

$

Now you can run your commands πŸš€


πŸ“š Why 0-shell?

βœ… Learn how shells work under the hood
βœ… Practice Rust systems programming
βœ… Explore tokenization, parsing, and process management


πŸ’‘ Contributing

PRs and suggestions are welcome! If you have ideas for new features, improvements, or documentation, feel free to open an issue.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages