* [patch] Missing -- in _subscript
@ 2016-05-19 3:08 Matthew Martin
0 siblings, 0 replies; only message in thread
From: Matthew Martin @ 2016-05-19 3:08 UTC (permalink / raw)
To: zsh-workers
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=--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-19 3:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-19 3:08 [patch] Missing -- in _subscript Matthew Martin
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).