Skip to content

WilsonKuo/codecrafters-shell-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Your Own Shell (Rust)

progress-banner

This is my implementation of the "Build Your Own Shell" Challenge provided by CodeCrafters, written in Rust.

It is a POSIX-compliant shell capable of interpreting shell commands, running built-in commands, and executing external programs.

Features

  • Interactive REPL: Built with rustyline to support command history and auto-completion.
  • Built-in Commands: Supports standard built-ins including cd, pwd, echo, exit, type, and history.
  • Program Execution: Resolves and executes external programs found in the system's $PATH.
  • Output Redirection: Supports standard output and standard error redirection (e.g., >, >>, 1>, 2>).
  • Pipelining: Can chain multiple commands together using pipes (|), allowing concurrent execution of external commands.
  • Path Auto-completion: Tab-completion for file and directory arguments, supporting partial matches.

Usage

You can build and run the shell locally using the provided script:

# Clone the repository
git clone <your-repo-url>
cd codecrafters-shell-rust

# Run the shell
./your_program.sh

Alternatively, you can use Cargo directly:

cargo run --release

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors