summaryrefslogtreecommitdiffstats
path: root/Completion/Base/_values
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-14 14:55:37 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-14 14:55:37 +0000
commit11ecfb4d94d6aa5dc42156a5e1c57b8d0bfc0223 (patch)
tree09f756cfecb0c20133a6833522742f78d792326b /Completion/Base/_values
parentzsh-workers/7825 (diff)
downloadzsh-11ecfb4d94d6aa5dc42156a5e1c57b8d0bfc0223.tar
zsh-11ecfb4d94d6aa5dc42156a5e1c57b8d0bfc0223.tar.gz
zsh-11ecfb4d94d6aa5dc42156a5e1c57b8d0bfc0223.tar.bz2
zsh-11ecfb4d94d6aa5dc42156a5e1c57b8d0bfc0223.tar.lz
zsh-11ecfb4d94d6aa5dc42156a5e1c57b8d0bfc0223.tar.xz
zsh-11ecfb4d94d6aa5dc42156a5e1c57b8d0bfc0223.tar.zst
zsh-11ecfb4d94d6aa5dc42156a5e1c57b8d0bfc0223.zip
zsh-workers/7827
Diffstat (limited to 'Completion/Base/_values')
-rw-r--r--Completion/Base/_values47
1 files changed, 22 insertions, 25 deletions
diff --git a/Completion/Base/_values b/Completion/Base/_values
index 9be2d97f3..21f6908cc 100644
--- a/Completion/Base/_values
+++ b/Completion/Base/_values
@@ -285,29 +285,25 @@ else
[[ -n "$sep" && ${#snames}+${#names}+${#onames} -ne 1 ]] &&
expl=( "-qS$sep" "$expl[@]" )
- tmp=''
if [[ -n "$compconfig[describe_values]" &&
- "$compconfig[describe_values]" != *\!${words[1]}* ]]; then
- if _display tmp odescr -M 'r:|[_-]=* r:|=*'; then
- if (( $#snames )); then
- compadd "$expl[@]" -y tmp -M 'r:|[_-]=* r:|=*' - \
- "$snames[@]" && ret=0
- compadd -n -S= -J "_$gdescr" -M 'r:|[_-]=* r:|=*' - \
- "${(@k)names}" && ret=0
- compadd -n -qS= -J "_$gdescr" -M 'r:|[_-]=* r:|=*' - \
- "${(@k)onames}" && ret=0
- elif (( $#names )); then
- compadd -n -S= "$expl[@]" -y tmp -M 'r:|[_-]=* r:|=*' - \
- "${(@k)names}" && ret=0
- compadd -n -qS= -J "_$gdescr" -M 'r:|[_-]=* r:|=*' - \
- "${(@k)onames}" && ret=0
- else
- compadd -n -qS= "$expl[@]" -y tmp -M 'r:|[_-]=* r:|=*' - \
- "${(@k)onames}" && ret=0
- fi
+ "$compconfig[describe_values]" != *\!${words[1]}* ]] &&
+ _display descr "$odescr[@]"; then
+ if (( $#snames )); then
+ tmp=( "${(@M)descr:#(${(j:|:)~snames}) *}" )
+ compadd "$expl[@]" -ld tmp -M 'r:|[_-]=* r:|=*' - \
+ "${(@)tmp%% *}" && ret=0
fi
- fi
- if [[ -z "$tmp" ]]; then
+ if (( $#names )); then
+ tmp=( "${(@M)descr:#(${(kj:|:)~names}) *}" )
+ compadd -S= "$expl[@]" -ld tmp -M 'r:|[_-]=* r:|=*' - \
+ "${(@)tmp%% *}" && ret=0
+ fi
+ if (( $#onames )); then
+ tmp=( "${(@M)descr:#(${(kj:|:)~onames}) *}" )
+ compadd -qS= "$expl[@]" -ld tmp -M 'r:|[_-]=* r:|=*' - \
+ "${(@)tmp%% *}" && ret=0
+ fi
+ else
compadd "$expl[@]" -M 'r:|[_-]=* r:|=*' - "$snames[@]" && ret=0
compadd -S= "$expl[@]" -M 'r:|[_-]=* r:|=*' - "${(@k)names}" && ret=0
compadd -qS= "$expl[@]" -M 'r:|[_-]=* r:|=*' - "${(@k)onames}" && ret=0
@@ -356,11 +352,12 @@ else
eval ws\=\( "${action[3,-3]}" \)
- if _display tmp ws; then
- compadd "$expl[@]" -y tmp - "${(@)ws%%:*}"
+ if [[ -n "$compconfig[describe_values]" &&
+ "$compconfig[describe_values]" != *\!${cmd}* ]] &&
+ _display tmp "$ws[@]"; then
+ compadd "$expl[@]" -M 'r:|[_-]=* r:|=*' -ld tmp - "${(@)ws%%:*}"
else
- _message "$descr"
- return 1
+ compadd "$expl[@]" - "${(@)ws%%:*}"
fi
elif [[ "$action" = \(*\) ]]; then