From ec1915958040eb8abf6609488f30df2723b76224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Martinez?= Date: Wed, 25 Jan 2017 15:34:59 +0100 Subject: [PATCH] `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 --- share/functions/__fish_complete_man.fish | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/functions/__fish_complete_man.fish b/share/functions/__fish_complete_man.fish index 43415e714..80df7c92f 100644 --- a/share/functions/__fish_complete_man.fish +++ b/share/functions/__fish_complete_man.fish @@ -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