mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
__fish_man_page: ignore prefixing variable assignments
This commit is contained in:
parent
1410f938aa
commit
feb87bbda8
2 changed files with 3 additions and 3 deletions
|
@ -10,8 +10,8 @@ function __fish_man_page
|
|||
|
||||
#Skip `sudo` and display then manpage of following command
|
||||
while set -q args[2]
|
||||
and test $args[1] = "sudo"
|
||||
set args $args[2..-1]
|
||||
and string match -qr -- '^(sudo|.*=.*)$' $args[1]
|
||||
set -e args[1]
|
||||
end
|
||||
|
||||
# If there are at least two tokens not starting with "-", the second one might be a subcommand.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function __fish_prepend_sudo -d "Prepend 'sudo ' to the beginning of the current commandline"
|
||||
set -l cmd (commandline -boc)
|
||||
set -l cmd (commandline -poc)
|
||||
if test "$cmd[1]" != "sudo"
|
||||
commandline -C 0
|
||||
commandline -i "sudo "
|
||||
|
|
Loading…
Reference in a new issue