summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <okiddle@yahoo.co.uk>2019-09-30 23:20:24 +0200
committerOliver Kiddle <okiddle@yahoo.co.uk>2019-09-30 23:20:24 +0200
commit934fc7d1164f6a2a90658ff98e642d282d394727 (patch)
treed04b7e4e84d878959cba25d02e77c6e11103df29
parent2c03873053d3ea5b4fc5da38cf189a5d9dcc7866 (diff)
downloadzsh-934fc7d1164f6a2a90658ff98e642d282d394727.tar.gz
zsh-934fc7d1164f6a2a90658ff98e642d282d394727.tar.xz
zsh-934fc7d1164f6a2a90658ff98e642d282d394727.zip
44783, 44791: mark some repeatable options with * in the _arguments specs
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Solaris/Command/_dladm2
-rw-r--r--Completion/Unix/Command/_ansible2
-rw-r--r--Completion/Unix/Command/_dsh4
-rw-r--r--Completion/Unix/Command/_ssh5
5 files changed, 12 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 77d770940..1eced2821 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2019-09-30  Oliver Kiddle  <okiddle@yahoo.co.uk>
 
+	* 44783, 44791: Completion/Solaris/Command/_dladm,
+	Completion/Unix/Command/_dsh, Completion/Unix/Command/_ssh,
+	Completion/Unix/Command/_ansible: mark some repeatable
+	options with * in the _arguments specs
+
 	* 44788: Completion/Redhat/Command/_rpm: handle newer rpm
 	commands like rpmkeys, rpmsign and update options
 
diff --git a/Completion/Solaris/Command/_dladm b/Completion/Solaris/Command/_dladm
index cb598de03..5ce9872d2 100644
--- a/Completion/Solaris/Command/_dladm
+++ b/Completion/Solaris/Command/_dladm
@@ -288,7 +288,7 @@ _dladm() {
     _arguments -A "-*" \
       '(-t --temporary)'{-t,--temporary}'[aggregation should be temporary]' \
       '(-R --root)'{-R,--root}'[root directory]:directory:_path_files -/' \
-      '(-l --link)'{-l,--link}'[component link]:link:_dladm_links' \
+      \*{-l,--link}'[component link]:link:_dladm_links' \
       '(-m --mode)'{-m,--mode}'[aggregation mode]:mode:(dlmp trunk)' \
       '(-P --policy)'{-P,--policy}'[port selection policy]:policy:_values -s , "policy" L2 L3 L4' \
       '(-L --lacp-mode)'{-L,--lacp-mode}'[LACP mode]:lacp mode:(off active passive)' \
diff --git a/Completion/Unix/Command/_ansible b/Completion/Unix/Command/_ansible
index 3e6a411c3..f1e13a813 100644
--- a/Completion/Unix/Command/_ansible
+++ b/Completion/Unix/Command/_ansible
@@ -49,7 +49,7 @@ case $service in
   ;|
   ansible|ansible-console|ansible-inventory|ansible-playbook|ansible-pull)
     args+=(
-      '(-i --inventory)'{-i+,--inventory=}'[specify inventory host file or host list]: : _alternative "files\:inventory file\:_files"
+      \*{-i+,--inventory=}'[specify inventory host file or host list]: : _alternative "files\:inventory file\:_files"
 	"hosts\:host\: _sequence _hosts"'
       '!(-i --inventory)--inventory-file=:inventory file:_files'
     )
diff --git a/Completion/Unix/Command/_dsh b/Completion/Unix/Command/_dsh
index fc7680062..2486b23fd 100644
--- a/Completion/Unix/Command/_dsh
+++ b/Completion/Unix/Command/_dsh
@@ -10,10 +10,10 @@ _arguments -s -C -S \
   '(-M --show-machine-names)'{-M,--show-machine-names}'[prepend the host name on output]' \
   '(-i --duplicate-input)'{-i,--duplicate-input}'[duplicate input given to dsh]' \
   '(-b --bufsize)'{-b,--bufsize}'[change buffer size used in input duplication]:buffer size for -i (bytes)' \
-  '(-m --machine)'{-m,--machine}'[execute on machine]:machine:{_hosts || _user_at_host}' \
+  \*{-m,--machine}'[execute on machine]:machine:{_hosts || _user_at_host}' \
   '(-n --num-topology)'{-n,--num-topology}'[how to divide the machines]:number' \
   '(-a --all)'{-a,--all}'[execute on all machines]' \
-  '(-g --group)'{-g,--group}'[execute on group member]:groupname:->groups' \
+  \*{-g,--group}'[execute on group member]:groupname:->groups' \
   '(-f --file)'{-f,--file}'[use the file as list of machines]:file:_files' \
   '(-r --remoteshell)'{-r,--remoteshell}'[execute using shell]:remote shell:(rsh ssh)' \
   '(-o --remoteshellopt)'{-o,--remoteshellopt}'[option to give to remote shell ]:option' \
diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh
index f8f4e0091..df1fe6ca8 100644
--- a/Completion/Unix/Command/_ssh
+++ b/Completion/Unix/Command/_ssh
@@ -4,7 +4,7 @@
 
 _ssh () {
   local curcontext="$curcontext" state line expl suf ret=1
-  local args common common_transfer algopt tmp p1 file cmn cmds sdesc
+  local args common common_transfer algopt tmp p1 file cmn cmds sdesc tdesc
   typeset -A opt_args
 
   common=(
@@ -30,6 +30,7 @@ _ssh () {
 
   case "$service" in
   ssh)
+    (( $+words[(r)-[^-]#t*] )) && tdesc=' even if there is no controlling tty'
     _arguments -C -s \
       '(-a)-A[enable forwarding of the authentication agent connection]' \
       '(-A)-a[disable forwarding of authentication agent connection]' \
@@ -60,7 +61,7 @@ _ssh () {
       '-Q+[query parameters]:query option:((cipher\:"supported symmetric ciphers" cipher-auth\:"supported symmetric ciphers that support authenticated encryption" mac\:"supported message integrity codes" kex\:"key exchange algorithms" key\:"key types" key-cert\:"certificate key types" key-plain\:"non-certificate key types" protocol-version\:"supported SSH protocol versions" sig\:"supported signature algorithms" help\:"show supported queries"))' \
       '-s[invoke subsystem]' \
       '(-t)-T[disable pseudo-tty allocation]' \
-      '(-T)-t[force pseudo-tty allocation]' \
+      "(-T)*-t[force pseudo-tty allocation${tdesc}]" \
       '-V[show version number]' \
       '(-q)*-v[verbose mode (multiple increase verbosity, up to 3)]' \
       '-W+[forward standard input and output to host]:stdinout forward:->hostport' \