Skip to content

RedaAz07/0-Shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

0-Shell

A small, educational Unix-like shell written in Rust. This project implements a minimal interactive shell with a handful of common commands and a simple command parser/executor.

Features

  • Built-in commands: cat, cd, cp, echo, exit, ls, mv, pwd_state, rm (see src/commands/)
  • Simple parser and executor: lightweight parsing and command dispatch (see src/helpers/)
  • Single-binary distribution: built with cargo build and run as shell.

Project Structure

  • src/main.rs: program entrypoint and REPL loop
  • src/commands/: implementations of individual built-in commands
  • src/helpers/: parser, executor and small utilities

Build Install Rust (if needed) and build with Cargo:

The release binary will be at target/release/shell (or target/debug/shell for a debug build).

Run (development)

cargo run --release --  # builds and runs the shell
# or
cargo run

Start the shell and try commands like:

> echo Hello world
> ls
> cat README.md
> cd ..
> pwd
> exit

Notes & Development

  • The command implementations live in src/commands/ and are designed to be small and easy to extend.
  • The parser and executor are in src/helpers/ and can be improved to support pipelines, redirection, and background execution.

If you'd like, I can add examples, tests, or CI configuration next.

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages