Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _subversion: Accept long options in the '--foo=bar' syntax.
- X-seq: zsh-workers 39853
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] _subversion: Accept long options in the '--foo=bar' syntax.
- Date: Mon, 7 Nov 2016 05:28:06 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=1tc YxwufqhxOABNk7UAKdYQ/oio=; b=tAsAFcRTFZUDfKo//xnTpXzBtRZDi7W/x8f a2SNpADhIzmVYQPzrAkjWXnar9ifDFnWmi1eaw/BH2VIY16n+J2HqBEn9ruYHv96 YQDgvvZF7N/AG6wJ/uTJK9amVxfBIQr3eTiyegrRYlCWIyiWK041eO5omDTtaZdu kA2tEkwI=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=1t cYxwufqhxOABNk7UAKdYQ/oio=; b=sPcL7EpXhQQZEhI0eLS9KU4E45OPR3MoRe JGdMUwm6r+PprKZ6DyA2LZI/dla8lLSEU4FLZmbWTzgBdExDVuS123xQiu1hBz86 EZ5WI51v4CeGZ2RB6zY0SfJDH4oR7C4DdTwpgMABG9lOcqhX0v/qL9nqIDQZFg4I chy0r+Kmo=
- 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
---
Completion/Unix/Command/_subversion | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion
index 7d15cf9..b0c0320 100644
--- a/Completion/Unix/Command/_subversion
+++ b/Completion/Unix/Command/_subversion
@@ -65,30 +65,33 @@ _svn () {
${=${${${(M)${(f)"$(_comp_locale; _call_program options svn help $cmd)"#(*Valid options:|(#e))}:#* :*}%% #:*}/ (arg|ARG)/:arg:}/(#b)(-##)([[:alpha:]]##) \[--([a-z-]##)\](:arg:)#/(--$match[3])$match[1]$match[2]$match[4] ($match[1]$match[2])--$match[3]$match[4]}
)
while (( idx=$args[(I)*--accept:arg:] )); do
- args[(I)*--accept:arg:]=( --accept':automatic conflict resolution action:((working\:working base\:base '"`for i j in p postpone mc mine-conflict tc theirs-conflict mf mine-full tf theirs-full e edit l launch; do print -rn $i\\\\:$j $j\\\\:$j ""; done `"'))' )
+ args[(I)*--accept:arg:]=( --accept'=:automatic conflict resolution action:((working\:working base\:base '"`for i j in p postpone mc mine-conflict tc theirs-conflict mf mine-full tf theirs-full e edit l launch; do print -rn $i\\\\:$j $j\\\\:$j ""; done `"'))' )
done
while (( idx=$args[(I)*--c(l|hangelist):arg:] )); do
- args[(I)*--c(l|hangelist):arg:]=( \*{--cl,--changelist}':change list:_svn_changelists' )
+ args[(I)*--c(l|hangelist):arg:]=( \*{--cl,--changelist}'=:change list:_svn_changelists' )
done
while (( idx=$args[(I)*--config-dir:arg:] )); do
- args[(I)*--config-dir:arg:]=( --config-dir':config dir:_directories' )
+ args[(I)*--config-dir:arg:]=( --config-dir'=:config dir:_directories' )
done
while (( idx=$args[(I)*--depth:arg:] )); do
- args[(I)*--depth:arg:]=( --depth':operation depth (how far to recurse):(empty files immediates infinity)' )
+ args[(I)*--depth:arg:]=( --depth'=:operation depth (how far to recurse):(empty files immediates infinity)' )
done
while (( idx=$args[(I)*(-F|--file):arg:] )); do
- args[(I)*(-F|--file):arg:]=( '(-F --file)'{-F,--file}':log message file:_files' )
+ args[(I)*(-F|--file):arg:]=( '(-F --file)'{-F+,--file=}':log message file:_files' )
done
while (( idx=$args[(I)*--set-depth:arg:] )); do
- args[(I)*--set-depth:arg:]=( --set-depth'[make working copy deeper or shallower]:new depth:(exclude empty files immediates infinity)' )
+ args[(I)*--set-depth:arg:]=( --set-depth'=[make working copy deeper or shallower]:new depth:(exclude empty files immediates infinity)' )
done
while (( idx=$args[(I)*--trust-server-cert-failures:arg:] )); do
- args[(I)*--trust-server-cert-failures:arg:]=( --trust-server-cert-failures':failures:_values -s , "certificate failures to ignore" "unknown-ca[unknown authority]" "cn-mismatch[hostname mismatch]" "expired[certificate expired]" "not-yet-valid[certificate not yet valid]" "other[all other failures]"' )
+ args[(I)*--trust-server-cert-failures:arg:]=( --trust-server-cert-failures'=:failures:_values -s , "certificate failures to ignore" "unknown-ca[unknown authority]" "cn-mismatch[hostname mismatch]" "expired[certificate expired]" "not-yet-valid[certificate not yet valid]" "other[all other failures]"' )
done
while (( idx=$args[(I)*--show-item:arg:] )); do
# (q) to quote the parentheses in the value
- args[(I)*--show-item:arg:]=( --show-item':item key:(('"`for i j in ${(kv)show_item_keys}; do print -rn - $i\\\\:"${(q)j}" ""; done`"'))' )
+ args[(I)*--show-item:arg:]=( --show-item'=:item key:(('"`for i j in ${(kv)show_item_keys}; do print -rn - $i\\\\:"${(q)j}" ""; done`"'))' )
done
+ # All other options get {-x+,--long-x=}
+ args=( ${args/(#b)(--[A-Za-z0-9-]##):arg:/$match[1]=:arg:} )
+ args=( ${args/(#b)([^=]):arg:/$match[1]+:arg:} )
_store_cache svn-${cmd}-args args
fi
@@ -215,6 +218,9 @@ _svnadmin () {
args=(
${=${${${(M)${(f)"$(_comp_locale; _call_program options svnadmin help $cmd)"#(*Valid options:|(#e))}:#* :*}%% #:*}/ (arg|ARG)/:arg:}/(#b)-([[:alpha:]]) \[--([a-z-]##)\](:arg:)#/(--$match[2])-$match[1]$match[3] (-$match[1])--$match[2]$match[3]}
)
+ # All options get {-x+,--long-x=}
+ args=( ${args/(#b)(--[A-Za-z0-9-]##):arg:/$match[1]=:arg:} )
+ args=( ${args/(#b)([^=]):arg:/$match[1]+:arg:} )
if [[ $usage == *REPOS_PATH* ]]; then
args+=( ":repository path:_files -/" )
case $cmd in
Messages sorted by:
Reverse Date,
Date,
Thread,
Author