summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Zsh/Context/_subscript4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a409a3109..5e6b148a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-26 Eric Cook <llua@gmx.com>
+
+ * 37788: Completion/Zsh/Context/_subscript: fix completion of
+ associative array keys
+
2016-01-26 Barton E. Schaefer <schaefer@brasslantern.com>
* 37785: Src/params.c: skip autoload parameters for "typeset -p"
diff --git a/Completion/Zsh/Context/_subscript b/Completion/Zsh/Context/_subscript
index 0ccc0c4ef..679f129a3 100644
--- a/Completion/Zsh/Context/_subscript
+++ b/Completion/Zsh/Context/_subscript
@@ -81,8 +81,8 @@ elif compset -P '\('; then
elif [[ ${(Pt)${compstate[parameter]}} = assoc* ]]; then
local suf MATCH MBEGIN MEND
local -a keys
- keys=(${${(kP)compstate[parameter]}//(#m)[\$\\\[\]\(\)\[\{\}]/\\$MATCH})
- keys=(${keys//#%(#m)[*@]/(e)$MATCH})
+ keys=("${(@)${(@k)${(P)compstate[parameter]}}//(#m)[\$\\\[\]\(\)\[\{\}]/\\$MATCH}")
+ keys=("${(@)keys//#%(#m)[*@]/(e)$MATCH}")
[[ "$RBUFFER" != (|\\)\]* ]] && suf="$osuf"
_wanted association-keys expl 'association key' \