mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 15:37:59 +08:00
Skip more leading commands in __fish_man_page
(#8612)
* Skip leading `xargs` in `__fish_man_page` * Complete the list * `git` does not qualify either
This commit is contained in:
parent
491dd92ac2
commit
aa6e0cc157
|
@ -8,9 +8,9 @@ function __fish_man_page
|
|||
return
|
||||
end
|
||||
|
||||
#Skip leading `sudo`/`command` and display then manpage of following command
|
||||
# Skip leading commands and display then manpage of following command
|
||||
while set -q args[2]
|
||||
and string match -qr -- '^(sudo|command|.*=.*)$' $args[1]
|
||||
and string match -qr -- '^(and|begin|builtin|caffeinate|command|doas|entr|env|exec|if|mosh|nice|not|or|pipenv|prime-run|setsid|sudo|systemd-nspawn|time|watch|while|xargs|.*=.*)$' $args[1]
|
||||
set -e args[1]
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user