diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2003-02-26 16:35:55 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2003-02-26 16:35:55 +0000 |
commit | 48df213153610e302b94c866f869a5861e359349 (patch) | |
tree | 34bd8b346f2b7de612806e0710d4d143bb39be5e /Completion/Base/Widget | |
parent | 194e4cac614cde3628293812f8edd285e593bfd1 (diff) | |
download | zsh-48df213153610e302b94c866f869a5861e359349.tar.gz zsh-48df213153610e302b94c866f869a5861e359349.tar.xz zsh-48df213153610e302b94c866f869a5861e359349.zip |
18299: allow _next_tags to work with nested tag loops
Diffstat (limited to 'Completion/Base/Widget')
-rw-r--r-- | Completion/Base/Widget/_next_tags | 4 |
1 files changed, 4 insertions, 0 deletions
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 |