fish_config: silence error when compiled without embed-data

This commit is contained in:
Johannes Altmanninger
2025-09-08 21:06:19 +02:00
parent 3f7a576835
commit f69c2a4d4a
3 changed files with 21 additions and 8 deletions

View File

@@ -54,7 +54,7 @@ function __fish_complete_man
split($1, t, " ");
sect = substr(t[3], 2, length(t[3]) - 2);
print t[1], sect ": " $2;
}
}
# Solaris 11
# Does not display descriptions
# Solaris apropos outputs embedded backspace in descriptions
@@ -70,7 +70,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(\.gz)?$' '$1\t1: fish command' -- $files (status list-files man/man1/ 2>/dev/null)
string replace -r '.*/([^/]+)\.1(\.gz)?$' '$1\t1: fish command' \
-- $files (status list-files man/man1/ 2>/dev/null)
end
else
return 1