diff options
Diffstat (limited to 'share/functions/__fish_print_commands.fish')
-rw-r--r-- | share/functions/__fish_print_commands.fish | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/share/functions/__fish_print_commands.fish b/share/functions/__fish_print_commands.fish index 21c0876d..bac2bd73 100644 --- a/share/functions/__fish_print_commands.fish +++ b/share/functions/__fish_print_commands.fish @@ -1,5 +1,7 @@ function __fish_print_commands --description "Print a list of documented fish commands" - if test -d $__fish_datadir/man/man1/ - find $__fish_datadir/man/man1/ -type f -name \*.1 -execdir basename '{}' .1 ';' - end + if test -d $__fish_datadir/man/man1/ + for file in $__fish_datadir/man/man1/**.1* + string replace -r '.*/' '' -- $file | string replace -r '.1(.gz)?$' '' + end + end end |