mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 10:01:11 +02:00
fix for _arguments: don't use argument-tag when completing options; fix for _services: leave loop when matches were produced (17148)
This commit is contained in:
parent
b0e4b61a82
commit
757e68c5e7
3 changed files with 11 additions and 2 deletions
|
@ -1,5 +1,10 @@
|
||||||
2002-05-14 Sven Wischnowsky <wischnow@zsh.org>
|
2002-05-14 Sven Wischnowsky <wischnow@zsh.org>
|
||||||
|
|
||||||
|
* 17148: Completion/Base/Utility/_arguments,
|
||||||
|
Completion/Unix/Type/_services: fix for _arguments: don't use
|
||||||
|
argument-tag when completing options; fix for _services: leave
|
||||||
|
loop when matches were produced
|
||||||
|
|
||||||
* 17147: Completion/Base/Utility/_describe,
|
* 17147: Completion/Base/Utility/_describe,
|
||||||
Completion/Zsh/Command/_zstyle, Doc/Zsh/compsys.yo,
|
Completion/Zsh/Command/_zstyle, Doc/Zsh/compsys.yo,
|
||||||
Src/Zle/computil.c: allow users to give the maximum number of
|
Src/Zle/computil.c: allow users to give the maximum number of
|
||||||
|
|
|
@ -335,9 +335,11 @@ if (( $# )) && comparguments -i "$autod" "$singopt[@]" "$@"; then
|
||||||
[[ -z "$hasopts" &&
|
[[ -z "$hasopts" &&
|
||||||
-z "$matched" &&
|
-z "$matched" &&
|
||||||
( -z "$aret" || "$PREFIX" = "$origpre" ) ]] &&
|
( -z "$aret" || "$PREFIX" = "$origpre" ) ]] &&
|
||||||
{ ! zstyle -T ":completion:${curcontext}:options" prefix-needed ||
|
{ ! zstyle -T ":completion:${oldcontext%:*}:options" prefix-needed ||
|
||||||
[[ "$origpre" = [-+]* || -z "$aret$mesg$tried" ]] } ; then
|
[[ "$origpre" = [-+]* || -z "$aret$mesg$tried" ]] } ; then
|
||||||
local prevpre="$PREFIX" previpre="$IPREFIX"
|
local prevpre="$PREFIX" previpre="$IPREFIX" prevcontext="$curcontext"
|
||||||
|
|
||||||
|
curcontext="${oldcontext%:*}:options"
|
||||||
|
|
||||||
hasopts=yes
|
hasopts=yes
|
||||||
|
|
||||||
|
@ -389,6 +391,7 @@ if (( $# )) && comparguments -i "$autod" "$singopt[@]" "$@"; then
|
||||||
fi
|
fi
|
||||||
PREFIX="$prevpre"
|
PREFIX="$prevpre"
|
||||||
IPREFIX="$previpre"
|
IPREFIX="$previpre"
|
||||||
|
curcontext="$prevcontext"
|
||||||
fi
|
fi
|
||||||
[[ -n "$tried" && "${${alwopt:+$origpre}:-$PREFIX}" != [-+]* ]] && break
|
[[ -n "$tried" && "${${alwopt:+$origpre}:-$PREFIX}" != [-+]* ]] && break
|
||||||
done
|
done
|
||||||
|
|
|
@ -18,6 +18,7 @@ while _tags; do
|
||||||
compadd -a inits && ret=0
|
compadd -a inits && ret=0
|
||||||
_requested xinetd expl 'xinetd services' \
|
_requested xinetd expl 'xinetd services' \
|
||||||
compadd -a xinetds && ret=0
|
compadd -a xinetds && ret=0
|
||||||
|
(( ret )) || break
|
||||||
done
|
done
|
||||||
|
|
||||||
return $ret
|
return $ret
|
||||||
|
|
Loading…
Reference in a new issue