diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 1dc0217..014b882 100644 --- a/src/main.rs +++ b/src/main.rs @@ -161,14 +161,20 @@ fn repl(paths: &Vec<&Path>, prompt: &str) { match err.kind() { // Occurs when the user doesn't have read access, or if the +x bit is not set std::io::ErrorKind::PermissionDenied => { - println!("dwvsh: permission denied: trying to fork to {}", &cmd) + println!( + "dwvsh: permission denied: trying to fork to {}", + cmd.split("/").last().unwrap() + ) } // Occurs if a command was removed from the path // If this is the case, refresh the path std::io::ErrorKind::NotFound => { bins = prefresh(&paths); - println!("dwvsh: {}: command not found", cmd); + println!( + "dwvsh: {}: command not found", + cmd.split("/").last().unwrap() + ); } // Otherwise print the OS error |