mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 06:38:27 +08:00
Search for command-not-found in PATH on startup, since older implementations place it there
darcs-hash:20080115122953-75c98-05ef8cb650a942c59dfa35aa63b25ccd49614dde.gz
This commit is contained in:
parent
b86856b454
commit
1f6fa1208e
|
@ -214,10 +214,19 @@ function __fish_config_interactive -d "Initializations that should be performed
|
|||
end
|
||||
|
||||
# If the ubuntu command-not-found package can be found, add a handler for it
|
||||
|
||||
# First check in /usr/lib, this is where modern Ubuntus place this command
|
||||
if test -f /usr/lib/command-not-found
|
||||
function fish_command_not_found_handler --on-event fish_command_not_found
|
||||
/usr/lib/command-not-found $argv
|
||||
end
|
||||
else
|
||||
# Ubuntu Feisty places this command in the regular path instead
|
||||
if type -p command-not-found >/dev/null
|
||||
function fish_command_not_found_handler --on-event fish_command_not_found
|
||||
command-not-found $argv
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user