__fish_complete_man: cope with gzipped man pages

This commit is contained in:
exploide
2025-05-25 11:48:28 +02:00
parent 8617964d4d
commit 18c4debbc0

View File

@@ -69,8 +69,8 @@ function __fish_complete_man
# Fish commands are not given by apropos
if not set -ql exclude_fish_commands
set -l files $__fish_data_dir/man/man1/*.1
string replace -r '.*/([^/]+)\.1$' '$1\t1: fish command' -- $files (status list-files man/man1/ 2>/dev/null)
set -l files $__fish_data_dir/man/man1/*.1*
string replace -r '.*/([^/]+)\.1(\.gz)?$' '$1\t1: fish command' -- $files (status list-files man/man1/ 2>/dev/null)
end
else
return 1