From 0b414b96624f4334bfc20e8c4fa70286edf60a14 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Tue, 18 Nov 2025 17:28:15 +0100 Subject: [PATCH] __fish_print_help: proper error message when 'man' is missing Commit 3f2e4b71bc9 (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. --- share/functions/__fish_print_help.fish | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/functions/__fish_print_help.fish b/share/functions/__fish_print_help.fish index a9575c93d..dfbf2cc42 100644 --- a/share/functions/__fish_print_help.fish +++ b/share/functions/__fish_print_help.fish @@ -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