Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Syntax errors in standard completions
- X-seq: zsh-workers 40808
- From: Fabian Klötzl <fabian@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] Syntax errors in standard completions
- Date: Thu, 9 Mar 2017 20:08:44 +0100
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi,
I found and corrected a small number of syntax errors in some of the
standard completions. A patch is attached. These errors can actually
simple be checked for with
grep -Pe "--?\w+,--?\w+\)" Completion/**/_*
That should give zero errors now.
Best,
Fabian
diff --git a/Completion/Linux/Command/_mdadm b/Completion/Linux/Command/_mdadm
index b2af3269d..b6dce7ccb 100644
--- a/Completion/Linux/Command/_mdadm
+++ b/Completion/Linux/Command/_mdadm
@@ -78,7 +78,7 @@ if (( $+words[(r)-(A|-assemble)] )); then
'(--scan -s)'{--scan,-s}'[scan config file for missing information]'
'(--run -R)'{--run,-R}'[try to start the array even if not enough devices for a full array are present]'
'(--force -f)'{--force,-f}'[assemble the array even if some superblocks appear out-of-date]'
- '(--update,-U)'{--update=,-U}'[update superblock]::update the superblock:(sparc2.2 summaries uuid resync byteorder super-minor)'
+ '(--update -U)'{--update=,-U}'[update superblock]::update the superblock:(sparc2.2 summaries uuid resync byteorder super-minor)'
)
fi
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index b6472cf36..43cbc46ec 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -6922,7 +6922,7 @@ __git_setup_diff_options () {
'(--no-prefix)--dst-prefix=[use given prefix for destination]:prefix'
'(--src-prefix --dst-prefix)--no-prefix[do not show any source or destination prefix]'
- '(-c,--cc)'{-c,--cc}'[combined diff format for merge commits]'
+ '(-c --cc)'{-c,--cc}'[combined diff format for merge commits]'
# TODO: --output is undocumented.
'--output[undocumented]:undocumented')
diff --git a/Completion/Unix/Command/_grep b/Completion/Unix/Command/_grep
index 5d548b567..a31cf9cf6 100644
--- a/Completion/Unix/Command/_grep
+++ b/Completion/Unix/Command/_grep
@@ -32,7 +32,7 @@ arguments+=(
'(--after-context -A)'{--after-context=,-A+}'[specify lines of trailing context]:lines'
'(--text -a --binary-files -I)'{--text,-a}'[process binary file as if it were text]'
'(--before-context -B)'{--before-context=,-B+}'[specify lines of leading context]:lines'
- '(--context,-C)'{--context=,-C-}'[specify lines of context]:lines'
+ '(--context -C)'{--context=,-C-}'[specify lines of context]:lines'
'(--color --colour)--'{color,colour}'=-[distinguish matching string]::when:(always never auto)'
'(--no-group-separator)--group-separator=[specify separator between blocks of context]:separator [--]'
"(--group-separator)--no-group-separator[don't separate context blocks]"
diff --git a/Completion/Unix/Command/_hg b/Completion/Unix/Command/_hg
index 8d31cd377..8eaa457c8 100644
--- a/Completion/Unix/Command/_hg
+++ b/Completion/Unix/Command/_hg
@@ -876,7 +876,7 @@ _hg_cmd_qdiff() {
_hg_cmd_qfold() {
_arguments -s : $_hg_global_opts $_h_commit_opts \
- '(--keep,-k)'{-k,--keep}'[keep folded patch files]' \
+ '(--keep -k)'{-k,--keep}'[keep folded patch files]' \
'*:unapplied patch:_hg_qunapplied'
}
diff --git a/Completion/Unix/Command/_java b/Completion/Unix/Command/_java
index 7a1224677..30231c5ee 100644
--- a/Completion/Unix/Command/_java
+++ b/Completion/Unix/Command/_java
@@ -65,7 +65,7 @@ java)
'-D-[specify a property]:property:->property' \
\*{-enableassertions,-ea}-::class \
\*{-disableassertions,-da}-::class \
- '(-enablesystemassertions,-esa,-disablesystemassertions,-dsa)'{-enablesystemassertions,-esa,-disablesystemassertions,-dsa} \
+ '(-enablesystemassertions -esa -disablesystemassertions -dsa)'{-enablesystemassertions,-esa,-disablesystemassertions,-dsa} \
'(-verbose:class)-verbose[print class information]' \
'(-verbose)-verbose\:class[print class information]' \
'-verbose\:gc[print gc information]' \
diff --git a/Completion/Unix/Command/_ls b/Completion/Unix/Command/_ls
index 74f317ad1..2ca59423d 100644
--- a/Completion/Unix/Command/_ls
+++ b/Completion/Unix/Command/_ls
@@ -78,7 +78,7 @@ else
'(--ignore-backups -B)'{--ignore-backups,-B}"[don't list entries ending with ~]"
'(--directory -d)'{--directory,-d}'[list directory entries instead of contents]'
'(--dired -D)'{--dired,-D}"[generate output designed for Emacs' dired mode]"
- '(--ignore,-I)'{--ignore,-I}"[don't list entire matching pattern]:pattern:"
+ '(--ignore -I)'{--ignore,-I}"[don't list entire matching pattern]:pattern:"
'(--dereference -L --dereference-command-line --dereference-command-line-symlink-to-dir)'{--dereference,-L}'[list referenced file for sym link]'
'(--dereference -L --dereference-command-line --dereference-command-line-symlink-to-dir)'{--dereference-command-line,--dereference-command-line-symlink-to-dir}
'(--recursive -R)'{--recursive,-R}'[list subdirectories recursively]'
diff --git a/Completion/Unix/Command/_mysql_utils b/Completion/Unix/Command/_mysql_utils
index 6532d0a7b..f1ad97bcd 100644
--- a/Completion/Unix/Command/_mysql_utils
+++ b/Completion/Unix/Command/_mysql_utils
@@ -212,7 +212,7 @@ _mysql_utils() {
'--defaults-extra-file=[read specified file after the global files]:defaults file:_files'
'(-S --socket)'{-S+,--socket=}'[specify socket file to use for connection]:server socket file:_files'
'(-h --host)'{-h+,--host=}'[specify server hostname]:hostname:_mysql_hosts'
- '(-P,--port)'{-P+,--port=}'[specify port number for connection]:server port:_mysql_ports'
+ '(-P --port)'{-P+,--port=}'[specify port number for connection]:server port:_mysql_ports'
'(-u --user)'{-u+,--user=}'[specify username for login]:server username:_mysql_users'
'(-p --password)'{-p-,--password=}'[specify password to use for connection]:server password'
'(-C --compress)'{-C,--compress}'[use compression in server/client protocol]'
diff --git a/Completion/Unix/Command/_rake b/Completion/Unix/Command/_rake
index 7fed949ab..8814edaa5 100644
--- a/Completion/Unix/Command/_rake
+++ b/Completion/Unix/Command/_rake
@@ -22,7 +22,7 @@ _arguments -C -s -S \
\*{--require,-r}'[require specified module before executing rakefile]:library:->library' \
'(- *)--rules[trace the rules resolution]' \
'(--quiet -q --silent -s --verbose -v)'{--silent,-s}"[like --quiet, but also suppresses the 'in directory' announcement]" \
- '(--system,-g)'{--system,-g}'[using system wide (global) rakefiles (usually '~/.rake/*.rake')]' \
+ '(--system -g)'{--system,-g}'[using system wide (global) rakefiles (usually '~/.rake/*.rake')]' \
'(- *)'{--tasks,-T}'[display the tasks (matching the specified pattern) with descriptions, then exit]:pattern::' \
'(--trace -t)'{--trace,-t}'[turn on invoke/execute tracing, enable full backtrace]' \
'(--quiet -q --silent -s --verbose -v)'{--verbose,-v}'[log message to standard output (default)]' \
diff --git a/Completion/Unix/Command/_user_admin b/Completion/Unix/Command/_user_admin
index f0777729c..7eeec7e9b 100644
--- a/Completion/Unix/Command/_user_admin
+++ b/Completion/Unix/Command/_user_admin
@@ -125,7 +125,7 @@ case ${service%???}:${(M)service%???}:$OSTYPE in
;|
group:*)
args+=(
- '(-g,--gid)'{-g+,--gid=}'[specify gid]:gid'
+ '(-g --gid)'{-g+,--gid=}'[specify gid]:gid'
'(-o --non-unique)'{-o,--non-unique}'[allow non unique gid]'
)
;|
diff --git a/Completion/Unix/Command/_wget b/Completion/Unix/Command/_wget
index b89f12353..8a9cc871a 100644
--- a/Completion/Unix/Command/_wget
+++ b/Completion/Unix/Command/_wget
@@ -32,7 +32,7 @@ _arguments -C -s \
'(--timeout -T)--dns-timeout=[set the DNS lookup timeout]:DNS lookup timeout (seconds)' \
'(--timeout -T)--connect-timeout=[set the connect timeout]:connect timeout (seconds)' \
'(--timeout -T)--read-timeout=[set the read timeout]:read timeout (seconds)' \
- '(--wait,-w)'{--wait=,-w+}'[specify wait between retrievals]:time (seconds)' \
+ '(--wait -w)'{--wait=,-w+}'[specify wait between retrievals]:time (seconds)' \
'(--random-wait)--waitretry=:time (seconds)' \
'(--waitretry)--random-wait[random wait time between retrievals]' \
'(--proxy -Y --no-proxy)'{--proxy=,-Y+}'[explicitly turn on proxy]' \
diff --git a/Completion/Unix/Command/_zpool b/Completion/Unix/Command/_zpool
index 950266896..4d4793eea 100644
--- a/Completion/Unix/Command/_zpool
+++ b/Completion/Unix/Command/_zpool
@@ -237,7 +237,7 @@ _zpool() {
_arguments -A "-*" \
'-D[Destroyed pools]' \
'(-d)*-c[Use cache file]:cache file:_files' \
- '(-c,-D)*-d[Search for devices or files in directory]:directory:_files -/' \
+ '(-c -D)*-d[Search for devices or files in directory]:directory:_files -/' \
'-F[Recovery mode: discard transactions if required]' \
'-f[Force import]' \
'-l[Display configuration in /dev/chassis location form]' \
Messages sorted by:
Reverse Date,
Date,
Thread,
Author