Skip to content

kmAyush/Rust-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Shell

A shell program easy to run, also supports special command cd, end and | pipeline

How to run

Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install Cargo

curl https://sh.rustup.rs -sSf | sh

Run cargo

cd Rust-shell
cargo run

Example

(base) ayush@admin:~/Downloads/ayushkm/Rust/shell$ cargo run
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.00s
     Running `target/debug/shell`
Welcome to the Rust shell
> ls
Cargo.lock  Cargo.toml	src  target
> cat src/main.rs | grep child
                    let child = Command :: new(command)
                    match child {
                        Ok(child) => {
                            prev_command = Some(child);
            // Wait for the child process to finish
> exit
(base) ayush@admin:~/Downloads/ayushkm/Rust/shell$ 

About

A Rust shell based on built-in Command process as a learning mini-project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages