mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-26 05:01:15 -03:00
Fix some issues in __fish_complete_subcommand.fish
Fix 'string length: Unknown option': add `--` before $subcommand Fix count $subcommand always = 1 with `sudo` and `doas`: give argv as array to __fish_complete_subcommand [ci skip]
This commit is contained in:
committed by
Johannes Altmanninger
parent
330f1701d7
commit
cb72a33e0c
@@ -24,7 +24,7 @@ function __fish_complete_subcommand -d "Complete subcommand" --no-scope-shadowin
|
||||
end
|
||||
set -l options_with_param $argv
|
||||
|
||||
if not string length -q $subcommand
|
||||
if not string length -q -- $subcommand
|
||||
set cmd (commandline -cop) (commandline -ct)
|
||||
while set -q cmd[1]
|
||||
set -l token $cmd[1]
|
||||
@@ -55,4 +55,3 @@ function __fish_complete_subcommand -d "Complete subcommand" --no-scope-shadowin
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user