man completions: complete fish commands (#3762)

* man completions: complete fish commands

`apropos` does not output fish commands so they were not completed.

* Improve __fish_complete_man
This commit is contained in:
Clément Martinez 2017-01-25 15:34:59 +01:00 committed by Fabian Homborg
parent b7d60dc7bb
commit ec19159580

View file

@ -64,6 +64,10 @@ function __fish_complete_man
print name, sect
}
'
# Fish commands are not given by apropos
set -l files $__fish_datadir/man/man1/*.1
string replace -r '.*/([^/]+)\.1$' '$1\tFish command' -- $files
else
return 1
end