Skip leading command in __fish_man_page

This commit is contained in:
Kid 2021-11-16 18:01:26 +08:00 committed by ridiculousfish
parent e066715127
commit 1e84164e4e

View File

@ -8,9 +8,9 @@ function __fish_man_page
return
end
#Skip `sudo` and display then manpage of following command
#Skip leading `sudo`/`command` and display then manpage of following command
while set -q args[2]
and string match -qr -- '^(sudo|.*=.*)$' $args[1]
and string match -qr -- '^(sudo|command|.*=.*)$' $args[1]
set -e args[1]
end