From 367148fdbe48464ddfd7114a21c0e4c7840c4dfe Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 9 Apr 2008 11:25:35 +0000 Subject: 24804: fix quoting of assoc array subscripts in completion --- Completion/Zsh/Context/_subscript | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Completion/Zsh') 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 -- cgit 1.4.1