Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _subversion: Complete multiple comma-separated arguments to --show-item=<TAB>.
- X-seq: zsh-workers 44904
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] _subversion: Complete multiple comma-separated arguments to --show-item=<TAB>.
- Date: Fri, 8 Nov 2019 14:22:39 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=from:to:subject:date:message-id; s=fm1; bh=cBYjo8prKgBsZNDh8YFdp+3rGeb327AlV76JzbwHODA=; b=Wrxx3qJNG/fY HU43Ycv+hN+DVFhcXtnyNRalupv+++jOOtz2OePTftjqC7MmMW1VBD5mqk1w3z5D rFHrNk95+Vm5Lu48wLFtS00lbmB7x6xDlNfs4MzPtn25Ph96UXGfj1IO1x5lWtHJ X062smdkOUMkbrXs436XQdDM5HWNr11KChgZ1aIgIuENlnbXuWE/3ZsZDnllbQ+s ldT/xdZX/uHxYqwUlnB/q19jgk4ZnvfuJ91y+oAj6bHh+hqhmLg19kaqaUx2Se8x aACpC6Jg64U5+/xhYlYtG2ItatAr4YnEk0pWtlH5Qi5MOVFgObY6jPfd+wPou+8S QAI+9ld/wA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=cBYjo8prKgBsZNDh8YFdp+3rGeb327AlV76JzbwHODA=; b=w3HHtAcB jNOV+Sq++vVrcZgBoLkzSCs9Ino1pO5Fsm6YnWDO6aHWiTZpDwzWj+wnoZgIbZpW iT4bHyjGkA1tAWiPqzFgfZe6MMFm3949raXnPyAMdC5P9EnaPtj5OifFMirDtjan TorXiTwvOcS72nAMqsuauBxdv1aLps9wXVnyYvl0l/jW3uWLBYz1w2c6+93PZkH1 xxh8ldsLrIIFDGkL/Rzar+cvMIuuKE+FzuhEjGXwf82apgMNXFZvE5sfdKAq5p2R bMzT/xIx/ZVg2fVEs1PxKKjrJsFm3tWT6PzDY7NVYcYgJbCPcysN3QvX/Tru7nOo x5xNg5c3mBCBDQ==
- 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
---
Completion/Unix/Command/_subversion | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion
index 28223c55b..b5532b101 100644
--- a/Completion/Unix/Command/_subversion
+++ b/Completion/Unix/Command/_subversion
@@ -3,8 +3,9 @@
_svn () {
local curcontext="$curcontext" state line expl ret=1
typeset -A opt_args
+ local i
- # Colons in values must be escaped.
+ # Colons and closing square brackets 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"
@@ -112,7 +113,11 @@ _svn () {
done
while (( idx=$args[(I)*--show-item:arg:] )); do
# (q) to quote the parentheses in the value
- args[idx]=( --show-item'=:item key:(('"`for i j in ${(kv)show_item_keys}; do print -rn - $i\\\\:"${(q)j}" ""; done`"'))' )
+ local -a show_items_plain_array
+ for i in ${(k)show_item_keys}; do
+ show_items_plain_array+=( $i\[${show_item_keys[$i]}\] )
+ done
+ args[idx]=( --show-item'=:item key:_values -s , "info items" ${show_items_plain_array[@]}' )
done
# All other options get {-x+,--long-x=}
args=( ${args/(#b)(--[A-Za-z0-9-]##):arg:/$match[1]=:arg:} )
Messages sorted by:
Reverse Date,
Date,
Thread,
Author