Browse Source

feat: add shell error enum

main
fdai7381 2 years ago
committed by fdai7451
parent
commit
2a42abbb3a
  1. 3
      src/error.rs
  2. 3
      src/main.rs

3
src/error.rs

@ -0,0 +1,3 @@
pub enum ShellError {
Execute(String),
}

3
src/main.rs

@ -1,3 +1,4 @@
mod error;
mod execute; mod execute;
mod parse; mod parse;
mod prompt; mod prompt;
@ -23,11 +24,9 @@ fn main() -> Result<()> {
} }
} }
Err(ReadlineError::Interrupted) => { Err(ReadlineError::Interrupted) => {
println!("CTRL-C");
break; break;
} }
Err(ReadlineError::Eof) => { Err(ReadlineError::Eof) => {
println!("CTRL-D");
break; break;
} }
Err(err) => { Err(err) => {

Loading…
Cancel
Save