From 4c2977b0ec0e0280899897863cba488d4cfbdebf Mon Sep 17 00:00:00 2001 From: Recolic K <bensl@microsoft.com> Date: Wed, 8 Jun 2022 16:42:15 +0800 Subject: [PATCH] cleanup and completion --- completions/antidote-cis.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/completions/antidote-cis.fish b/completions/antidote-cis.fish index 74b17e1..07624a2 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 -- GitLab