From e8a35bfaa83c3a93cd7e9c214c410a01eeb8781b Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Thu, 16 Aug 2018 13:20:04 -0500 Subject: [PATCH] Prevent errors in __fish_describe_command when apropos isn't installed __fish_describe_command now bails early if `type -q apropos` returns a non-zero exit code. --- share/functions/__fish_describe_command.fish | 1 + 1 file changed, 1 insertion(+) diff --git a/share/functions/__fish_describe_command.fish b/share/functions/__fish_describe_command.fish index d102f0e71..7fb334d78 100644 --- a/share/functions/__fish_describe_command.fish +++ b/share/functions/__fish_describe_command.fish @@ -8,6 +8,7 @@ function __fish_describe_command -d "Command used to find descriptions for comma # TODO: stop interpolating argv into regex, and remove this hack. string match --quiet --regex '^[a-zA-Z0-9_ ]+$' -- "$argv" or return + type -q apropos; or return apropos $argv 2>/dev/null | awk -v FS=" +- +" '{ split($1, names, ", "); for (name in names)