mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-12-05 17:31:19 +01:00
zsh-workers/7824
This commit is contained in:
parent
a854d7cd13
commit
b37b46e294
2 changed files with 13 additions and 4 deletions
|
|
@ -628,8 +628,11 @@ if [[ -z "$def" || "$def" = :* ]]; then
|
||||||
[[ -n "$inrest" ]] && opt=''
|
[[ -n "$inrest" ]] && opt=''
|
||||||
fi
|
fi
|
||||||
if [[ -z "$def" ]]; then
|
if [[ -z "$def" ]]; then
|
||||||
_message 'no more arguments'
|
if [[ -z "$args$rest" ]]; then
|
||||||
noargs=yes
|
noargs='no arguments'
|
||||||
|
else
|
||||||
|
noargs='no more arguments'
|
||||||
|
fi
|
||||||
fi
|
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
|
for i in ${(s::)prefix[2,-1]%%${tmp[1][2]}*} ${tmp[1][2]}; do
|
||||||
_options[${prefix[1]}$i]=''
|
_options[${prefix[1]}$i]=''
|
||||||
done
|
done
|
||||||
|
noargs=''
|
||||||
break
|
break
|
||||||
elif compset -P "$tmp[1]"; then
|
elif compset -P "$tmp[1]"; then
|
||||||
|
|
||||||
|
|
@ -659,6 +663,7 @@ if [[ -z "$def" || "$def" = :* ]]; then
|
||||||
|
|
||||||
def="$dopts[$tmp[1]]"
|
def="$dopts[$tmp[1]]"
|
||||||
opt=''
|
opt=''
|
||||||
|
noargs=''
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
shift 1 tmp
|
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
|
for i in ${(s::)prefix[2,-1]%%${tmp[1][2]}*} ${tmp[1][2]}; do
|
||||||
_options[${prefix[1]}$i]=''
|
_options[${prefix[1]}$i]=''
|
||||||
done
|
done
|
||||||
|
noargs=''
|
||||||
break
|
break
|
||||||
elif compset -P "$tmp[1]"; then
|
elif compset -P "$tmp[1]"; then
|
||||||
def="$odopts[$tmp[1]]"
|
def="$odopts[$tmp[1]]"
|
||||||
opt=''
|
opt=''
|
||||||
|
noargs=''
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
shift 1 tmp
|
shift 1 tmp
|
||||||
|
|
@ -914,6 +921,8 @@ while true; do
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n "$noargs" ]] && _message "$noargs"
|
||||||
|
|
||||||
[[ -n "$aret" ]] && return 300
|
[[ -n "$aret" ]] && return 300
|
||||||
|
|
||||||
# Set the return value.
|
# Set the return value.
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ if [[ -n "$format" ]]; then
|
||||||
compstate[list]=list
|
compstate[list]=list
|
||||||
compstate[insert]=''
|
compstate[insert]=''
|
||||||
compadd -UX "${format//\\%d/$1}" -n ''
|
compadd -UX "${format//\\%d/$1}" -n ''
|
||||||
|
compstate[force_list]=yes
|
||||||
else
|
else
|
||||||
compadd -X "${format//\\%d/$1}" -n ''
|
compadd -X "${format//\\%d/$1}" -n '' && compstate[force_list]=yes
|
||||||
fi
|
fi
|
||||||
compstate[force_list]=yes
|
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue