From 8df5547f2db9400a3d250b6f9516873fdd97e28e Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Fri, 13 May 2022 20:39:54 +0200 Subject: [PATCH] __fish_man_page: don't try tokens with slashes as subcommands man-db's man 2.7 as shipped in OpenSUSE fails to set a non-zero exit code when invoked like "man ls-some/dir". This means that we fail to display the man page if the commandline is "ls some/dir". Work around this by never treating tokens with slashes as subcommand. --- share/functions/__fish_man_page.fish | 1 + 1 file changed, 1 insertion(+) diff --git a/share/functions/__fish_man_page.fish b/share/functions/__fish_man_page.fish index 5d687c21d..ef2bee562 100644 --- a/share/functions/__fish_man_page.fish +++ b/share/functions/__fish_man_page.fish @@ -23,6 +23,7 @@ function __fish_man_page # the best we can do is to *try* the man page, and assume that `man` will return false if it fails. # See #7863. if set -q args[2] + and not string match -q -- '*/*' $args[2] and man "$maincmd-$args[2]" &>/dev/null man "$maincmd-$args[2]" else