Skip to content

vinayakankugoyal/rshell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rshell

A custom shell implementation written in Rust with modern features.

Features

  • Command Execution: Run external commands and shell builtins
  • Command History: Navigate through previous commands with up/down arrows
  • History Search: Type to see matching commands from history in gray (press right arrow to accept)
  • Tab Completion: Auto-complete commands from your PATH
  • Cursor Navigation: Move cursor left/right to edit anywhere in the command line
  • I/O Redirection: Support for stdout (>, >>) and stderr (2>, 2>>) redirection
  • Piping: Chain multiple commands together with |

Builtin Commands

  • exit - Exit the shell
  • echo - Print text to stdout
  • type - Display command type and location
  • pwd - Print current working directory
  • cd - Change directory
  • history - View and manage command history
    • history - Show all history
    • history N - Show last N commands
    • history -r FILE - Read history from file
    • history -w FILE - Write history to file
    • history -a FILE - Append history to file

Building

cargo build --release

Running

cargo run
# or after building
./target/release/rshell

Usage Examples

$ ls -la
$ echo "Hello World" > output.txt
$ cat file.txt | grep pattern
$ history 10
$ cd ~/projects

Requirements

  • Rust 1.91 or higher
  • Unix-like system (Linux, macOS)

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published