Merge pull request #4 from ams-hash/clearer_err_message

Made the error message when command is not found clearer
master
Able 2021-11-07 06:31:28 +03:00 committed by GitHub
commit 553da66dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}
}
};
}