pmsh 0.0.1

A custom shell written in Rust
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::parser::SimpleCommand;

pub fn execute(cmd: &SimpleCommand) -> Result<(), String> {
    if !cmd.args.is_empty() {
        return Err(format!("{}: no arguments expected", cmd.name));
    }

    let version = env!("CARGO_PKG_VERSION");
    let name = env!("CARGO_PKG_NAME");

    println!("{} version {}", name, version);
    println!("A simple shell written in Rust.");
    println!("GitHub: https://github.com/philipmiesbauer/pmsh");

    Ok(())
}