From 69bdfc2601cfe857dc1fc74eaf7e469127f8cf3f Mon Sep 17 00:00:00 2001 From: Able Date: Sat, 6 Nov 2021 22:31:21 -0500 Subject: [PATCH] add help command --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index cc6e103..b96b1d5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,10 +7,8 @@ use std::{ const VERSION: &str = env!("CARGO_PKG_VERSION"); fn main() { loop { - // use the `>` character as the prompt - // need to explicitly flush this to ensure it prints before read_line - print!("~> "); + // need to explicitly flush this to ensure it prints before read_line stdout().flush().unwrap(); let mut input = String::new(); @@ -39,6 +37,7 @@ fn main() { previous_command = None; } "version" => println!("Rash version: {}", VERSION), + "help" => println!("Able Shell help utility"), "exit" => return, command => { let stdin = previous_command.map_or(Stdio::inherit(), |output: Child| {