Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _subversion: Complete --show-item values
- X-seq: zsh-workers 36306
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] _subversion: Complete --show-item values
- Date: Thu, 27 Aug 2015 23:14:07 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=tmi phpXeFSXtr939zIP+0Ow8gGY=; b=vfdG3JamgAbfugb/2ZJ7QFdWzZ+bIFttKZG myw88yypq2YV0RsaGasRUgTbfwdxgo3kW7n8FKhC8V2NhY/iRq/7H48kx1O7Kf5a WY60EtmdyNpaSNvbbnBSrSedlrxquV/dtkgOxfys54MTzRhjDkGDFZJY7keg9Ku8 V73nQb2M=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=tm iphpXeFSXtr939zIP+0Ow8gGY=; b=dhyJ6LsDIWRlqYB9ixF+VOrOOwA4+QWcz1 +6zid0DdqxyxLn12mUgjyjcpkm0Hi5LOCBF33pMg6TBue0QdX1p6OT3vTPqOKK1t gB4RSqnZPlMSJvo5aRn7mzWtQ0ds8I6t71Jpa9LmQo+/SE1xUeX6yfbNhPEEjYnC ehQQMtUwU=
- 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 | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion
index bbcaf3a..3cc9e8a 100644
--- a/Completion/Unix/Command/_subversion
+++ b/Completion/Unix/Command/_subversion
@@ -4,6 +4,20 @@ _svn () {
local curcontext="$curcontext" state line expl ret=1
typeset -A opt_args
+ # Colons in values must be escaped.
+ local -A show_item_keys=(
+ kind "the kind of TARGET (file or dir)"
+ url "the URL of TARGET in the repository"
+ relative-url "the repository-relative URL"
+ repos-root-url "the repository root URL"
+ repos-uuid "the repository UUID"
+ revision "the revision of TARGET"
+ last-changed-revision "the most recent revision in which TARGET was changed"
+ last-changed-date "the date of the last-changed revision"
+ last-changed-author "the author of the last-changed revision"
+ wc-root "the working copy root path"
+ )
+
local update_policy
zstyle -s ":completion:*:*:$service:*" cache-policy update_policy
if [[ -z "$update_policy" ]]; then
@@ -71,6 +85,10 @@ _svn () {
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]"' )
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`"'))' )
+ done
_store_cache svn-${cmd}-args args
fi
--
2.1.4
Messages sorted by:
Reverse Date,
Date,
Thread,
Author