From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16929 invoked from network); 7 Jul 2021 00:04:23 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Jul 2021 00:04:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:From:Reply-To:Cc: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=6RvUKjw+tFCuNh5RfusT3ALQ/8rEYO4YmRdCf8085uw=; b=DXceSg1mOHZSHhKzcvs5WiSFit OM7hX/z9JFvPlYYrfimau2K+AgL4SxsAB+UErYL/weynptIvkbcAQtPHHpK2lx5j52r4jqLPHXod0 HQjl0JGo/kTKwRoeNd0h2qKAE5HR/SdO8wGL/Cystigas1TJ/H2G841DRiWH8R0moDUhoVziPV0Pc Hs9iBWZtskiD++D+Ngp0I5QlMJ+rWk1BHcBN9ntc2OO5xXP771rsL+KlQ6rfeX22i+pSfeTnSxWNh EmgPXRoMd6D6jsc4NK7l36IA9C1cxje/8BLQKIwOhI0lit0s6HMLYX/kvjCAQYAB+gGYn6W7y+VDg H61KuyBg==; Received: from authenticated user by zero.zsh.org with local id 1m0v39-000FAw-9w; Wed, 07 Jul 2021 00:04:23 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1m0v2t-000Es7-KR; Wed, 07 Jul 2021 00:04:07 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.94.2) (envelope-from ) id 1m0v2t-000Kdt-7K for zsh-workers@zsh.org; Wed, 07 Jul 2021 02:04:07 +0200 From: Oliver Kiddle To: Zsh workers Subject: PATCH: remove commas in completion exclusion lists MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <79351.1625616247.1@hydra> Date: Wed, 07 Jul 2021 02:04:07 +0200 Message-ID: <79352-1625616247.223683@Jtni.aLFW.gDXO> X-Seq: 49151 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Another error that is easy to grep for is the use of a comma in an _arguments exclusion list. It's an easy mistake to make given a brace expansion on the same line along with the fact that the only thing it breaks is the exclusion. This is a patch for some identified cases. Included is one case where the error is in the brace expansion. Oliver diff --git a/Completion/Debian/Command/_dak b/Completion/Debian/Command/_dak index 086196c4a..8ecfd84b3 100644 --- a/Completion/Debian/Command/_dak +++ b/Completion/Debian/Command/_dak @@ -27,7 +27,7 @@ case $cmd in '(-G --greaterthan)'{-G,--greaterthan} '(-r --regex)'{-r,--regex} '(-s --suite)'{-s,--suite=}':suite:_values -s , "suite list" oldstable stable testing unstable experimental' - '(-S, --source-and-binary)'{-S,--source-and-binary} + '(-S --source-and-binary)'{-S,--source-and-binary} '*:package:_deb_packages avail' ) ;; @@ -75,7 +75,7 @@ case $cmd in '(-p --partial)'{-p,--partial}'[do not affect override files]' '(-R --rdep-check)'{-R,--rdep-check}'[check reverse dependencies]' '(-s --suite)'{-s,--suite=}':suite:_values -s , "suite list" oldstable stable testing unstable experimental' - '(-S, --source-only)'{-S,--source-only}'[remove source only]' + '(-S --source-only)'{-S,--source-only}'[remove source only]' '*:package:_deb_packages avail' ) ;; @@ -155,10 +155,10 @@ case $cmd in '(-c --component)'{-c,--component=}':component:(main contrib non-free)' '(-s --suite)'{-s,--suite=}':suite:(oldstable stable testing unstable experimental)' '(-t --type)'{-t,--type=}':type:(deb dsc udeb)' - '(-a, --add)'{-a,--add}'[add overrides]' - '(-S, --set)'{-S,--set}'[set overrides]' - '(-l, --list)'{-l,--list}'[list overrides]' - '(-q, --quiet)'{-q,--quiet}'[be less verbose]' + '(-a --add)'{-a,--add}'[add overrides]' + '(-S --set)'{-S,--set}'[set overrides]' + '(-l --list)'{-l,--list}'[list overrides]' + '(-q --quiet)'{-q,--quiet}'[be less verbose]' ) ;; diff --git a/Completion/Debian/Command/_dpkg b/Completion/Debian/Command/_dpkg index 3477e6116..48ea2db97 100644 --- a/Completion/Debian/Command/_dpkg +++ b/Completion/Debian/Command/_dpkg @@ -86,7 +86,7 @@ _dpkg_deb_and_query_only_options=( _dpkg_query_actions=( '(--status -s)'{--status,-s}'[display package status]:*:packages:->status' '(--print-avail -p)'{--print-avail,-p}'[display available details]:packages:_deb_packages avail' - '(--listfiles, -L)'{--listfiles,-L}'[list owned files]:*:packages:->listfiles' + '(--listfiles -L)'{--listfiles,-L}'[list owned files]:*:packages:->listfiles' '(--list -l)'{--list,-l}'[list packages]:*:packages:->list' '(--search -S)'{--search,-S}'[search for file owner]:*:pattern:->search' '--admindir=[data directory]:directory:_files -/' diff --git a/Completion/Debian/Command/_madison b/Completion/Debian/Command/_madison index 445b79a45..dfdf1b438 100644 --- a/Completion/Debian/Command/_madison +++ b/Completion/Debian/Command/_madison @@ -9,6 +9,6 @@ _arguments \ '(-h --help)'{-h,--help} \ '(-r --regex)'{-r,--regex} \ '(-s --suite)'{-s,--suite=}':suite:_values -s , "suite list" oldstable stable testing unstable' \ - '(-S, --source-and-binary)'{-S,--source-and-binary} \ + '(-S --source-and-binary)'{-S,--source-and-binary} \ '*:package:_deb_packages avail' diff --git a/Completion/Unix/Command/_aap b/Completion/Unix/Command/_aap index 089a993c3..38e50f1fc 100644 --- a/Completion/Unix/Command/_aap +++ b/Completion/Unix/Command/_aap @@ -20,7 +20,7 @@ _arguments -C -s -S \ \*{-c,--command=}'[execute a command after reading the recipe]:aap command:' \ '(-k --continue)'{-k,--continue}'[continue building after an error]' \ '(-S --stop)'{-S,--stop}'[stop building at first error (default)]' \ - '(-N,--nofetch-recipe -R --fetch-recipe)'{-R,--fetch-recipe}'[fetch recipe file and child recipes]' \ + '(-N --nofetch-recipe -R --fetch-recipe)'{-R,--fetch-recipe}'[fetch recipe file and child recipes]' \ '(-R --fetch-recipe -N --nofetch-recipe)'{-N,--nofetch-recipe}'[do not fetch recipes for "fetch" target]' \ '(-a --nocache)'{-a,--nocache}"[always download files, don't use the cache]" \ '(-l --local)'{-l,--local}'[do not recurse into subdirectories]' \ diff --git a/Completion/Unix/Command/_samba b/Completion/Unix/Command/_samba index 775543794..6c7a64e18 100644 --- a/Completion/Unix/Command/_samba +++ b/Completion/Unix/Command/_samba @@ -96,7 +96,7 @@ case $service in smbstatus) _arguments -s -S $args \ {-b,--brief}'[brief output]' \ - '(-v --verbose)'(-v,--verbose)'[be verbose]' \ + '(-v --verbose)'{-v,--verbose}'[be verbose]' \ '(-d --debuglevel)'{-d+,--debuglevel=}'[specify debug level]:debug level:(0 1 2 3 4 5 6 7 8 9 10)' \ '(-u --user)'{-u+,--user=}'[specify user to restrict information to]:user:_users' \ '(-B --byterange)'{-B,--byterange}'[include byte range locks]' \ diff --git a/Completion/Unix/Command/_setfacl b/Completion/Unix/Command/_setfacl index 5c573a581..14be49d95 100644 --- a/Completion/Unix/Command/_setfacl +++ b/Completion/Unix/Command/_setfacl @@ -3,11 +3,11 @@ if _pick_variant cygwin=cygwin unix --version; then # cygwin 1.5.25 _arguments -s -S \ - '(-d, --delete)'{-d,--delete}'[delete one or more specified ACL entries]:ACL entry:' \ - '(-f, --file)'{-f,--file}'[set ACL entries for FILE to ACL entries read from a ACL_FILE]:ACL file:_files' \ - '(-m, --modify)'{-m,--modify}'[modify one or more specified ACL entries]:ACL entry:' \ - '(-r, --replace)'{-r,--replace}'[replace mask entry with maximum permissions needed for the file group class]' \ - '(-s, --substitute)'{-s,--substitute}'[substitute specified ACL entries for the \[ACL of FILE\]]:ACL entry:' \ + '(-d --delete)'{-d,--delete}'[delete one or more specified ACL entries]:ACL entry' \ + '(-f --file)'{-f,--file}'[set ACL entries for FILE to ACL entries read from a ACL_FILE]:ACL file:_files' \ + '(-m --modify)'{-m,--modify}'[modify one or more specified ACL entries]:ACL entry' \ + '(-r --replace)'{-r,--replace}'[replace mask entry with maximum permissions needed for the file group class]' \ + '(-s --substitute)'{-s,--substitute}'[substitute specified ACL entries for the \[ACL of FILE\]]:ACL entry' \ '(- *)'{-h,--help}'[output usage information and exit]' \ '(- *)'{-v,--version}'[output version information and exit]' \ '*: :_files' diff --git a/Completion/Zsh/Function/_zargs b/Completion/Zsh/Function/_zargs index f974ab646..94a35e3a5 100644 --- a/Completion/Zsh/Function/_zargs +++ b/Completion/Zsh/Function/_zargs @@ -18,17 +18,17 @@ case $numeofs in #zargs arguments arguments=( '(--eof -e)'{--eof=,-e+}'[change the end-of-input-args string from "--" to eof-str]' - '(--exit, -x)'{--exit,-x}'[exit if the size (see --max-chars) is exceeded]' + '(--exit -x)'{--exit,-x}'[exit if the size (see --max-chars) is exceeded]' '--help[print summary and exit]' - '(--interactive, -p)'{--interactive,-p}'[prompt before executing each command line]' - '(--max-args, -n)'{--max-args=,-n+}'[use at most max-args arguments per command line]' - '(--max-chars, -s)'{--max-chars=,-s+}'[use at most max-chars characters per command line]' - '(--max-lines, -l)'{--max-lines=,-l+}'[use at most max-lines of the input-args per command line]' - '(--max-procs, -P)'{--max-procs=,-P+}'[run up to max-procs command lines in the background at once]' - '(--no-run-if-empty, -r)'{--no-run-if-empty,-r}'[do nothing if there are no input arguments before the eof-str]' - '(--null, -0)'{--null,-0}'[split each input-arg at null bytes, for xargs compatibility]' - '(--replace, -i)'{--replace=,-i}'[substitute replace-str in the initial-args by each initial-arg]' - '(--verbose, -t)'{--verbose,-t}'[print each command line to stderr before executing it]' + '(--interactive -p)'{--interactive,-p}'[prompt before executing each command line]' + '(--max-args -n)'{--max-args=,-n+}'[use at most max-args arguments per command line]' + '(--max-chars -s)'{--max-chars=,-s+}'[use at most max-chars characters per command line]' + '(--max-lines -l)'{--max-lines=,-l+}'[use at most max-lines of the input-args per command line]' + '(--max-procs -P)'{--max-procs=,-P+}'[run up to max-procs command lines in the background at once]' + '(--no-run-if-empty -r)'{--no-run-if-empty,-r}'[do nothing if there are no input arguments before the eof-str]' + '(--null -0)'{--null,-0}'[split each input-arg at null bytes, for xargs compatibility]' + '(--replace -i)'{--replace=,-i}'[substitute replace-str in the initial-args by each initial-arg]' + '(--verbose -t)'{--verbose,-t}'[print each command line to stderr before executing it]' '--version[print the version number of zargs and exit]' ) _arguments -S -s $arguments[@] && ret=0