From 48df213153610e302b94c866f869a5861e359349 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 26 Feb 2003 16:35:55 +0000 Subject: 18299: allow _next_tags to work with nested tag loops --- Completion/Base/Widget/_next_tags | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Completion/Base/Widget/_next_tags') diff --git a/Completion/Base/Widget/_next_tags b/Completion/Base/Widget/_next_tags index eaf7e3ace..c6d095482 100644 --- a/Completion/Base/Widget/_next_tags +++ b/Completion/Base/Widget/_next_tags @@ -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 -- cgit 1.4.1