1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-30 07:10:58 +02:00

zsh-workers/7804

This commit is contained in:
Tanaka Akira 1999-09-13 14:00:34 +00:00
parent 1f0ee9b324
commit 4ea731c9d8

View file

@ -8,7 +8,7 @@ setopt localoptions extendedglob
local args rest ws cur nth def nm expl descr action opt arg tmp xor local args rest ws cur nth def nm expl descr action opt arg tmp xor
local single uns ret=1 aret soptseq soptseq1 sopts prefix _line odescr local single uns ret=1 aret soptseq soptseq1 sopts prefix _line odescr
local beg optbeg argbeg nargbeg inopt inrest fromrest cmd="$words[1]" local beg optbeg argbeg nargbeg inopt inrest fromrest cmd="$words[1]"
local matched curopt local matched curopt noargs
# Associative arrays used to collect information about the options. # Associative arrays used to collect information about the options.
@ -625,6 +625,10 @@ if [[ -z "$def" || "$def" = :* ]]; then
fromrest=yes fromrest=yes
[[ -n "$inrest" ]] && opt='' [[ -n "$inrest" ]] && opt=''
fi fi
if [[ -z "$def" ]]; then
_message 'no more arguments'
noargs=yes
fi
fi fi
# In any case, we have to complete option names here, but we may # In any case, we have to complete option names here, but we may
@ -814,7 +818,7 @@ while true; do
# Probably add the option names. # Probably add the option names.
if [[ -n "$opt" && if [[ -n "$opt" &&
( ( nm -eq compstate[nmatches] && -z "$aret" ) || ( ( ( nm -eq compstate[nmatches] || -n "$noargs" ) && -z "$aret" ) ||
-z "$compconfig[option_prefix]" || -z "$compconfig[option_prefix]" ||
"$compconfig[option_prefix]" = *\!${cmd}* || "$compconfig[option_prefix]" = *\!${cmd}* ||
"$PREFIX" = [-+]* ) ]]; then "$PREFIX" = [-+]* ) ]]; then