From b4298092ed19ef7958384a1630e501f288f033d4 Mon Sep 17 00:00:00 2001 From: ams-hash Date: Sun, 7 Nov 2021 02:48:03 +0000 Subject: [PATCH] Made the error message when command is not found clearer --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 713e9a4..08e8e42 100644 --- a/src/main.rs +++ b/src/main.rs @@ -72,7 +72,9 @@ fn main() { } Err(e) => { previous_command = None; - eprintln!("{}", e); + if e.to_string() == "No such file or directory (os error 2)" { + eprintln!("{} not found", command); + } } }; }