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:
liljencrantz 2008-01-15 22:29:53 +10:00
parent b86856b454
commit 1f6fa1208e

View File

@ -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