__fish_print_help: proper error message when 'man' is missing

Commit 3f2e4b71bc (functions/__fish_print_help: bravely remove
fallback to mandoc/groff, 2025-11-09) savagely made commands like
"abbr -h" require man, or else it prints a noisy stack trace.
Some packages have not yet replaced "nroff/mandoc" with "man"
as dependency, and, independent of that, man is still an optional
dependency.

Make missing "man" a proper error, which is easier to read tan the
stack trace.
This commit is contained in:
Johannes Altmanninger
2025-11-18 17:28:15 +01:00
parent 012007ce7b
commit 0b414b9662

View File

@@ -1,5 +1,10 @@
# localization: skip(private)
function __fish_print_help --description "Print help for the specified fish function or builtin"
if not type -q man
fish_command_not_found man
return 1
end
set -l item (__fish_canonicalize_builtin $argv[1])
function __fish_print_help_man -V item -a man1