diff options
author | Eric Cook <illua@users.sourceforge.net> | 2016-01-26 23:20:36 -0500 |
---|---|---|
committer | Eric Cook <illua@users.sourceforge.net> | 2016-01-26 23:20:36 -0500 |
commit | 25ca90e5abadd83f13e23a9866ec52c98d0b04a7 (patch) | |
tree | a670908a1a23800915deff9ff09a9dd7a40ec286 | |
parent | 10c5f95f52e449242170b17cd053c3ff8447e64a (diff) | |
download | zsh-25ca90e5abadd83f13e23a9866ec52c98d0b04a7.tar.gz zsh-25ca90e5abadd83f13e23a9866ec52c98d0b04a7.tar.xz zsh-25ca90e5abadd83f13e23a9866ec52c98d0b04a7.zip |
37788: _subscript - fix completion of associative array keys
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Completion/Zsh/Context/_subscript | 4 |
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' \ |