mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-26 05:51:08 +02:00
zsh-workers/7450
This commit is contained in:
parent
5460b0d4b8
commit
6adafae34f
5 changed files with 11 additions and 11 deletions
|
@ -372,13 +372,13 @@ else
|
|||
|
||||
# If the action starts with a space, we just call it.
|
||||
|
||||
$=action
|
||||
${(e)=~action}
|
||||
else
|
||||
|
||||
# Otherwise we call it with the description-arguments built above.
|
||||
|
||||
action=( $=action )
|
||||
"$action[1]" "$expl[@]" "${(@)action[2,-1]}"
|
||||
${(e)action[1]} "$expl[@]" ${(e)~action[2,-1]}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -260,10 +260,10 @@ if [[ "$str" = *\=* ]]; then
|
|||
compadd "$expl[@]" - ${=action[2,-2]}
|
||||
elif (( $#action )); then
|
||||
if [[ "$action" = \ * ]]; then
|
||||
$=action
|
||||
${(e)=~action}
|
||||
else
|
||||
action=($=action)
|
||||
$action[1] "$expl[@]" $action[2,-1]
|
||||
${(e)action[1]} "$expl[@]" ${(e)~action[2,-1]}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -310,10 +310,10 @@ if [[ "$str" = *\=* ]]; then
|
|||
if [[ "$parta[1]" = (\[|\() ]]; then
|
||||
compadd "$expl[@]" - ${=parta[2,-2]}
|
||||
elif [[ "$parta" = \ * ]]; then
|
||||
$=parta
|
||||
${(e)=~parta}
|
||||
else
|
||||
action=($=parta)
|
||||
$action[1] "$expl[@]" $action[2,-1]
|
||||
${(e)~parta[1]} "$expl[@]" ${(e)~action[2,-1]}
|
||||
fi
|
||||
else
|
||||
compadd -S '' - "$PREFIX"
|
||||
|
|
|
@ -4,8 +4,8 @@ local expl
|
|||
|
||||
if [[ "$PREFIX" = :* ]]; then
|
||||
_description expl 'character class'
|
||||
compadd -p: -S ':]' alnum alpha blank cntrl digit graph lower print punct \
|
||||
space upper xdigit
|
||||
compadd "$expl[@]" -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
|
||||
|
|
|
@ -7,8 +7,8 @@ if [[ "$fl" = -*(a*u|u*a)* || "$fl" = -*a* && CURRENT -ge 4 ]]; then
|
|||
compgen "$expl[@]" -B
|
||||
elif [[ "$fl" = -*u* ]]; then
|
||||
_description expl module
|
||||
compadd - $(zmodload)
|
||||
compadd "$expl[@]" - $(zmodload)
|
||||
else
|
||||
_description expl 'module file'
|
||||
compadd - ${^module_path}/*(N:t:r)
|
||||
compadd "$expl[@]" - ${^module_path}/*(N:t:r)
|
||||
fi
|
||||
|
|
|
@ -52,6 +52,6 @@ else
|
|||
return ret
|
||||
else
|
||||
_description expl executable
|
||||
_files -/g '*(*)'
|
||||
_files "$expl[@]" -/g '*(*)'
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue