From 7c670f1e6a0e154f0b1a2d4b6eed0e71c9404b56 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Sat, 3 Jul 1999 13:16:46 +0000 Subject: zsh-3.1.5-pws-25 --- Completion/Base/_subscript | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'Completion/Base/_subscript') diff --git a/Completion/Base/_subscript b/Completion/Base/_subscript index 00b2b6506..be5f08f62 100644 --- a/Completion/Base/_subscript +++ b/Completion/Base/_subscript @@ -1,6 +1,9 @@ #compdef -subscript- -if [[ ${(Pt)${compstate[parameter]}} = assoc* ]]; then +if [[ "$PREFIX" = :* ]]; then + compadd -p: -S ':]' alnum alpha blank cntrl digit graph lower print punct \ + space upper xdigit +elif [[ ${(Pt)${compstate[parameter]}} = assoc* ]]; then if [[ "$RBUFFER" = \]* ]]; then compadd -S '' - "${(@kP)${compstate[parameter]}}" else @@ -13,15 +16,15 @@ elif [[ ${(Pt)${compstate[parameter]}} = array* ]]; then list=() for i in "$ind[@]"; do [[ "$i" = ${PREFIX}*${SUFFIX} ]] && - list=( "$list[@]" "${(r:4:: ::):)i} ${(P)${compstate[parameter]}[$i]} -) + list=( "$list[@]" + "${(r:4:: ::):)i} $(print -D ${(P)${compstate[parameter]}[$i]})" ) done - if [[ "$RBUFFER" = \]* ]]; then - compadd -S '' -y list - "$ind[@]" - else - compadd -S ']' -y list - "$ind[@]" - fi + if [[ "$RBUFFER" = \]* ]]; then + compadd -S '' -V default -y list - "$ind[@]" + else + compadd -S ']' -V default -y list - "$ind[@]" + fi else _compalso -math- fi -- cgit 1.4.1