diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Completion/Zsh/Context/_subscript | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 32e72a3fb..990f8214a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-09 Peter Stephenson <pws@csr.com> + + * 24804: Completion/Zsh/Context/_subscript: quoting of + associative array keys for subscripts was wrong. + 2008-04-07 Clint Adams <clint@zsh.org> * Markus Waldeck: 24799: Completion/Unix/Command/_vorbis: diff --git a/Completion/Zsh/Context/_subscript b/Completion/Zsh/Context/_subscript index 7d01565ca..ba398ffa5 100644 --- a/Completion/Zsh/Context/_subscript +++ b/Completion/Zsh/Context/_subscript @@ -67,12 +67,14 @@ elif compset -P '\('; then _values -s '' 'subscript flags' $flags elif [[ ${(Pt)${compstate[parameter]}} = assoc* ]]; then - local suf + local suf MATCH MBEGIN MEND + local -a keys + keys=(${${(kP)compstate[parameter]}//(#m)[\$\\\[\]\(\)\[\{\}]/\\$MATCH}) [[ "$RBUFFER" != (|\\)\]* ]] && suf="$osuf" _wanted association-keys expl 'association key' \ - compadd -S "$suf" -k "$compstate[parameter]" + compadd -Q -S "$suf" -a keys elif [[ ${(Pt)${compstate[parameter]}} = array* ]]; then local list i j ret=1 disp |