mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
__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.
This commit is contained in:
parent
bb325e497a
commit
8df5547f2d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user