Support nixos command-not-found handler

This commit is contained in:
Max Gonzih 2014-12-07 13:33:40 +01:00 committed by David Adam
parent 8124b5073f
commit 46cd89c2db

View file

@ -224,6 +224,11 @@ function __fish_config_interactive -d "Initializations that should be performed
function __fish_command_not_found_handler --on-event fish_command_not_found
/usr/lib/command-not-found -- $argv
end
# Check for NixOS handler
else if test -f /run/current-system/sw/bin/command-not-found
function __fish_command_not_found_handler --on-event fish_command_not_found
/run/current-system/sw/bin/command-not-found $argv
end
# Ubuntu Feisty places this command in the regular path instead
else if type -q -p command-not-found
function __fish_command_not_found_handler --on-event fish_command_not_found