Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[patch] Missing -- in _subscript
- X-seq: zsh-workers 38515
- From: Matthew Martin <phy1729@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [patch] Missing -- in _subscript
- Date: Wed, 18 May 2016 22:08:57 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-disposition:user-agent; bh=/CY1be0Ax56Aw+e4ithDTQDDdxqARvaTsnSf04YL2iA=; b=H69yNSwLZh/19M5E/cpPyn08Lccgnaw1HfaLgDq7sxXWqtIZin298tBFDXX79bGvgc rdPqzaAGZyeh6+JVCRgKf49ZQMxyoOvUo3mh6ozA+QfHCceVuqmn1ZzWmjbqEUYPKK1r 1fvnEiB36hfZcsmw13Hci8WkMvgVnIyznZXLeR8XJPOmAKA9KCNpSYY3odkmJ0LI91aG HB6fLt7YpbGKkNCikgpKrpYXj4quhxRiC2qUIvIyJ27cURE1/ZXAj1DDpow8YMkuUMh+ VQzMy64wccGKqTV0AXrc03P2El5mnw8Cn3Fx2i6ve3xJn2WYp3ypt+ex2fi6P1xJgRPV SNag==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
The print is missing a -- before variable input. Ran into this when
doing print $historywords[<tab>.
Also change some arr=( "$arr[@]" foo ) to arr+=( foo ) while here.
diff --git a/Completion/Zsh/Context/_subscript b/Completion/Zsh/Context/_subscript
index 80642d8..88813b5 100644
--- a/Completion/Zsh/Context/_subscript
+++ b/Completion/Zsh/Context/_subscript
@@ -99,10 +99,9 @@ elif [[ ${(Pt)${compstate[parameter]}} = array* ]]; then
list=()
for i in "$ind[@]"; do
if [[ "$i" = ${PREFIX}*${SUFFIX} ]]; then
- list=( "$list[@]"
- "${i}:$(print -D ${(P)${compstate[parameter]}[$i]})" )
+ list+=( "${i}:$(print -D -- ${(P)${compstate[parameter]}[$i]})" )
else
- list=( "$list[@]" '' )
+ list+=( '' )
fi
done
zstyle -s ":completion:${curcontext}:indexes" list-separator sep || sep=--
Messages sorted by:
Reverse Date,
Date,
Thread,
Author