1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-06-10 01:06:04 +02:00

18299: allow _next_tags to work with nested tag loops

This commit is contained in:
Oliver Kiddle 2003-02-26 16:35:55 +00:00
parent 194e4cac61
commit 48df213153
5 changed files with 14 additions and 0 deletions

View File

@ -1,5 +1,10 @@
2003-02-26 Oliver Kiddle <opk@zsh.org>
* 18299: Completion/Base/Core/_main_complete,
Completion/Base/Core/_all_labels, Completion/Base/Core/_next_label,
Completion/Base/Widget/_next_tags: allow _next_tags to work with
nested tag loops
* 18300: Completion/Unix/Command/_tar,
Completion/Unix/Type/_tar_archive: handle tar's -C option better

View File

@ -24,6 +24,8 @@ else
fi
while comptags "-A$__prev" "$1" curtag __spec; do
(( $#funcstack > _tags_level )) && _comp_tags="${_comp_tags% * }"
_tags_level=$#funcstack
_comp_tags="$_comp_tags $__spec "
if [[ "$curtag" = *[^\\]:* ]]; then
zformat -f __descr "${curtag#*:}" "d:$3"

View File

@ -23,6 +23,7 @@ local func funcs ret=1 tmp _compskip format nm call match min max i num\
_matchers _matcher _c_matcher _matcher_num _comp_tags _comp_mesg \
mesg str context state line opt_args val_args curcontext="$curcontext" \
_last_nmatches=-1 _last_menu_style _def_menu_style _menu_style sel \
_tags_level=0 \
_saved_exact="${compstate[exact]}" \
_saved_lastprompt="${compstate[last_prompt]}" \
_saved_list="${compstate[list]}" \

View File

@ -6,6 +6,8 @@ __gopt=()
zparseopts -D -a __gopt 1 2 V J x
if comptags -A "$1" curtag __spec; then
(( $#funcstack > _tags_level )) && _comp_tags="${_comp_tags% * }"
_tags_level=$#funcstack
_comp_tags="$_comp_tags $__spec "
if [[ "$curtag" = *[^\\]:* ]]; then
zformat -f __descr "${curtag#*:}" "d:$3"

View File

@ -34,6 +34,8 @@ _next_tags() {
fi
while comptags "-A$__prev" "$1" curtag __spec; do
(( $#funcstack > _tags_level )) && _comp_tags="${_comp_tags% * }"
_tags_level=$#funcstack
[[ "$_next_tags_not" = *\ ${__spec}\ * ]] && continue
_comp_tags="$_comp_tags $__spec "
if [[ "$curtag" = *[^\\]:* ]]; then
@ -59,6 +61,8 @@ _next_tags() {
zparseopts -D -a __gopt 1 2 V J x
if comptags -A "$1" curtag __spec; then
(( $#funcstack > _tags_level )) && _comp_tags="${_comp_tags% * }"
_tags_level=$#funcstack
[[ "$_next_tags_not" = *\ ${__spec}\ * ]] && continue
_comp_tags="$_comp_tags $__spec "
if [[ "$curtag" = *[^\\]:* ]]; then