From 2a42abbb3a60b452c95ae21e0a76261c988a7743 Mon Sep 17 00:00:00 2001 From: fdai7381 Date: Tue, 17 Jan 2023 19:27:52 +0100 Subject: [PATCH] feat: add shell error enum --- src/error.rs | 3 +++ src/main.rs | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 src/error.rs diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 0000000..291a017 --- /dev/null +++ b/src/error.rs @@ -0,0 +1,3 @@ +pub enum ShellError { + Execute(String), +} diff --git a/src/main.rs b/src/main.rs index 11e3bc2..bff60ff 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,4 @@ +mod error; mod execute; mod parse; mod prompt; @@ -23,11 +24,9 @@ fn main() -> Result<()> { } } Err(ReadlineError::Interrupted) => { - println!("CTRL-C"); break; } Err(ReadlineError::Eof) => { - println!("CTRL-D"); break; } Err(err) => {