diff --git a/completions/antidote-cis.fish b/completions/antidote-cis.fish index 74b17e112d99d95574d6f7756f06bad880e30d9c..07624a2b99dd2a830a0a8b2b569c1e7ff35fb090 100644 --- a/completions/antidote-cis.fish +++ b/completions/antidote-cis.fish @@ -32,7 +32,7 @@ function __antidote_count_cmdline_args # It take care of quotes and escaped space. # # Note that, "antidote-cis push " counts as 3, because empty argument also counts! This is especially useful for completion. - set -l cleaned_cmdline (commandline -p | string replace --regex -a '\\\\.' '' | string replace --regex -a '"[^"]*"' '' | string replace --regex -a "'[^']*'" '') + set -l cleaned_cmdline (commandline -p | string replace --regex -a '\\\\.' '' | string replace --regex -a '"[^"]*"' '' | string replace --regex -a "'[^']*'" '' | string replace --regex -a ' +' ' ') count (echo $cleaned_cmdline | string split ' ') end