mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-13 16:37:34 +00:00
parent
a1b43b7a09
commit
004b794c82
1 changed files with 13 additions and 2 deletions
|
@ -237,8 +237,19 @@ function __fish_config_interactive -d "Initializations that should be performed
|
||||||
# Remove fish_command_not_found_setup so we only execute this once
|
# Remove fish_command_not_found_setup so we only execute this once
|
||||||
functions --erase __fish_command_not_found_setup
|
functions --erase __fish_command_not_found_setup
|
||||||
|
|
||||||
# First check in /usr/lib, this is where modern Ubuntus place this command
|
# First check if we are on OpenSUSE since SUSE's handler has no options
|
||||||
if test -f /usr/lib/command-not-found
|
# and expects first argument to be a command and second database
|
||||||
|
if test -f /etc/SuSE-release
|
||||||
|
function __fish_command_not_found_handler --on-event fish_command_not_found
|
||||||
|
/usr/bin/command-not-found $argv
|
||||||
|
end
|
||||||
|
# Check for Fedora's handler
|
||||||
|
else if test -f /usr/libexec/pk-command-not-found
|
||||||
|
function __fish_command_not_found_handler --on-event fish_command_not_found
|
||||||
|
/usr/libexec/pk-command-not-found -- $argv
|
||||||
|
end
|
||||||
|
# Check in /usr/lib, this is where modern Ubuntus place this command
|
||||||
|
else if test -f /usr/lib/command-not-found
|
||||||
function __fish_command_not_found_handler --on-event fish_command_not_found
|
function __fish_command_not_found_handler --on-event fish_command_not_found
|
||||||
/usr/lib/command-not-found -- $argv
|
/usr/lib/command-not-found -- $argv
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue