From b2baf110c59ae8a990fdcdf78a7834c4c74e4295 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sun, 21 Mar 2021 10:03:09 +0100 Subject: [PATCH] Disable pacman command-not-found handler Apparently it's too slow on some systems Fixes #7841. (cherry picked from commit 95dc821a448fac684c07f8a98fb3c7ed5b8445fa) --- share/functions/fish_command_not_found.fish | 23 +++++++++++---------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/share/functions/fish_command_not_found.fish b/share/functions/fish_command_not_found.fish index db568fd69..a6c43f920 100644 --- a/share/functions/fish_command_not_found.fish +++ b/share/functions/fish_command_not_found.fish @@ -57,17 +57,18 @@ else if type -q pkgfile __fish_default_command_not_found_handler $argv[1] end end -else if type -q pacman - function fish_command_not_found - set -l paths $argv[1] - # If we've not been given an absolute path, try $PATH as the starting point, - # otherwise pacman will try *every path*, and e.g. bash-completion - # isn't helpful. - string match -q '/*' -- $argv[1]; or set paths $PATH/$argv[1] - # Pacman only prints the path, so we still need to print the error. - __fish_default_command_not_found_handler $argv[1] - pacman -F $paths - end +# pacman is too slow, see #7841. +# else if type -q pacman +# function fish_command_not_found +# set -l paths $argv[1] +# # If we've not been given an absolute path, try $PATH as the starting point, +# # otherwise pacman will try *every path*, and e.g. bash-completion +# # isn't helpful. +# string match -q '/*' -- $argv[1]; or set paths $PATH/$argv[1] +# # Pacman only prints the path, so we still need to print the error. +# __fish_default_command_not_found_handler $argv[1] +# pacman -F $paths +# end else # Use standard fish command not found handler otherwise function fish_command_not_found --on-event fish_command_not_found