Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: some repeatable options in completions
- X-seq: zsh-workers 44783
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: some repeatable options in completions
- Date: Fri, 27 Sep 2019 11:40:44 +0200
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1569577248; bh=nIVQ4XZx+oOENw620id1vWBo5iEwbBJvvVQqivBGZwk=; h=From:To:Subject:Date:From:Subject; b=Q7h4zqsMEdLcLE1ePP1lEgkFQ9YjiLmahZE/EYoT6NR408cI4kDHOJa5NiEAtM69aLyzpdk6ShM7BSDjcYBGsrHH3CKK8k3MMTgsNCJNwNxmki4fwQ2xYnx4/U+LOhERX7E2PHAfceBFtrjaXDPpc6VG1tt3ftqQtYtHfwahwpVVXHppmwjoj0EvmHAN8Y6WwEPjNL34E7pQiT7pRauvK07b4w1W2I+s74xEhackQAWYTpR4r1ByaEcJFzrx83sbxaBjLwolOyHMBXj95vJIAEh/ACVmXaYrJNfdhVwlgM/RzQCb2I8EY2aByzwRKi+I9u0b8ChrqfdnuksyizpwdA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
The fact that a particular option can be repeated is easily missed. The
following corrects a few cases that I've come across. In the case of
ssh, multiple -t options force tty allocation, even if ssh has no local
tty. So I'm not sure there's any meaning to specifying it more than
twice but _arguments doesn't provide an easy way to indicate that.
Oliver
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/_ssh b/Completion/Unix/Command/_ssh
index f8f4e0091..52052a4bb 100644
--- a/Completion/Unix/Command/_ssh
+++ b/Completion/Unix/Command/_ssh
@@ -60,7 +60,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]' \
'-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' \
Messages sorted by:
Reverse Date,
Date,
Thread,
Author