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