Skip to content

Commit a5b59a5

Browse files
committed
update cnf handler
1 parent 07bdb7d commit a5b59a5

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
#!/bin/sh
22

33
# Function: command_not_found_handler
4-
# Description: [Add description here]
5-
# Usage: command_not_found_handler [arguments]
6-
# Alias: cnfh
4+
# Description: function that runs when a command is not found
5+
# Usage: command_not_found_handler [bad_command]
76

87
command_not_found_handler() {
98
# $1 is the command name typed
109
# $@ is the whole argument list
1110
echo -e "${mauve}\"$1\"${reset}\nCommand not found :(${reset}" | cowsay -n
12-
echo "\n${yellow}Checking for aliases...${reset}\n"
11+
echo "\n${yellow}Checking for aliases... Ctrl + C to cancel${reset}\n"
1312
is_alias "$1"
1413
}
15-
16-
# Create alias
17-
alias cnfh="command_not_found_handler"

0 commit comments

Comments
 (0)