1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-12-04 17:11:30 +01:00

zsh-workers/7824

This commit is contained in:
Tanaka Akira 1999-09-14 10:13:28 +00:00
parent a854d7cd13
commit b37b46e294
2 changed files with 13 additions and 4 deletions

View file

@ -628,8 +628,11 @@ if [[ -z "$def" || "$def" = :* ]]; then
[[ -n "$inrest" ]] && opt=''
fi
if [[ -z "$def" ]]; then
_message 'no more arguments'
noargs=yes
if [[ -z "$args$rest" ]]; then
noargs='no arguments'
else
noargs='no more arguments'
fi
fi
fi
@ -651,6 +654,7 @@ if [[ -z "$def" || "$def" = :* ]]; then
for i in ${(s::)prefix[2,-1]%%${tmp[1][2]}*} ${tmp[1][2]}; do
_options[${prefix[1]}$i]=''
done
noargs=''
break
elif compset -P "$tmp[1]"; then
@ -659,6 +663,7 @@ if [[ -z "$def" || "$def" = :* ]]; then
def="$dopts[$tmp[1]]"
opt=''
noargs=''
break
fi
shift 1 tmp
@ -675,10 +680,12 @@ if [[ -z "$def" || "$def" = :* ]]; then
for i in ${(s::)prefix[2,-1]%%${tmp[1][2]}*} ${tmp[1][2]}; do
_options[${prefix[1]}$i]=''
done
noargs=''
break
elif compset -P "$tmp[1]"; then
def="$odopts[$tmp[1]]"
opt=''
noargs=''
break
fi
shift 1 tmp
@ -914,6 +921,8 @@ while true; do
break
done
[[ -n "$noargs" ]] && _message "$noargs"
[[ -n "$aret" ]] && return 300
# Set the return value.

View file

@ -10,8 +10,8 @@ if [[ -n "$format" ]]; then
compstate[list]=list
compstate[insert]=''
compadd -UX "${format//\\%d/$1}" -n ''
compstate[force_list]=yes
else
compadd -X "${format//\\%d/$1}" -n ''
compadd -X "${format//\\%d/$1}" -n '' && compstate[force_list]=yes
fi
compstate[force_list]=yes
fi