Skip to content

Commit

Permalink
Prevent errors in __fish_describe_command when apropos isn't installed
Browse files Browse the repository at this point in the history
__fish_describe_command now bails early if `type -q apropos` returns a
non-zero exit code.
  • Loading branch information
mqudsi committed Aug 16, 2018
1 parent b39651f commit e8a35bf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions share/functions/__fish_describe_command.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e8a35bf

Please sign in to comment.