summaryrefslogtreecommitdiffstats
path: root/Completion/Base/_subscript
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-19 11:18:05 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-19 11:18:05 +0000
commit9867c4091e71e6ed69889a9bfaee07275d2fa04e (patch)
tree37318116ff90f7b90df7cb9e894790d96be0849b /Completion/Base/_subscript
parentzsh-workers/7446 (diff)
downloadzsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.gz
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.bz2
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.lz
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.xz
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.zst
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.zip
manual/7448
Diffstat (limited to 'Completion/Base/_subscript')
-rw-r--r--Completion/Base/_subscript13
1 files changed, 9 insertions, 4 deletions
diff --git a/Completion/Base/_subscript b/Completion/Base/_subscript
index be5f08f62..090a5f07a 100644
--- a/Completion/Base/_subscript
+++ b/Completion/Base/_subscript
@@ -1,17 +1,22 @@
#compdef -subscript-
+local expl
+
if [[ "$PREFIX" = :* ]]; then
+ _description expl 'character class'
compadd -p: -S ':]' alnum alpha blank cntrl digit graph lower print punct \
space upper xdigit
elif [[ ${(Pt)${compstate[parameter]}} = assoc* ]]; then
+ _description expl 'association key'
if [[ "$RBUFFER" = \]* ]]; then
- compadd -S '' - "${(@kP)${compstate[parameter]}}"
+ compadd "$expl[@]" -S '' - "${(@kP)${compstate[parameter]}}"
else
- compadd -S ']' - "${(@kP)${compstate[parameter]}}"
+ compadd "$expl[@]" -S ']' - "${(@kP)${compstate[parameter]}}"
fi
elif [[ ${(Pt)${compstate[parameter]}} = array* ]]; then
local list i j
+ _description expl 'array index'
ind=( {1..${#${(P)${compstate[parameter]}}}} )
list=()
for i in "$ind[@]"; do
@@ -21,9 +26,9 @@ elif [[ ${(Pt)${compstate[parameter]}} = array* ]]; then
done
if [[ "$RBUFFER" = \]* ]]; then
- compadd -S '' -V default -y list - "$ind[@]"
+ compadd "$expl[@]" -S '' -V default -y list - "$ind[@]"
else
- compadd -S ']' -V default -y list - "$ind[@]"
+ compadd "$expl[@]" -S ']' -V default -y list - "$ind[@]"
fi
else
_compalso -math-