We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07bdb7d commit a5b59a5Copy full SHA for a5b59a5
functions/command_not_found_handler.sh
@@ -1,17 +1,13 @@
1
#!/bin/sh
2
3
# Function: command_not_found_handler
4
-# Description: [Add description here]
5
-# Usage: command_not_found_handler [arguments]
6
-# Alias: cnfh
+# Description: function that runs when a command is not found
+# Usage: command_not_found_handler [bad_command]
7
8
command_not_found_handler() {
9
# $1 is the command name typed
10
# $@ is the whole argument list
11
echo -e "${mauve}\"$1\"${reset}\nCommand not found :(${reset}" | cowsay -n
12
- echo "\n${yellow}Checking for aliases...${reset}\n"
+ echo "\n${yellow}Checking for aliases... Ctrl + C to cancel${reset}\n"
13
is_alias "$1"
14
}
15
-
16
-# Create alias
17
-alias cnfh="command_not_found_handler"
0 commit comments