summaryrefslogtreecommitdiffstats
path: root/Completion/Base/Widget
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-02-26 16:35:55 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-02-26 16:35:55 +0000
commit48df213153610e302b94c866f869a5861e359349 (patch)
tree34bd8b346f2b7de612806e0710d4d143bb39be5e /Completion/Base/Widget
parent18300: handle tar's -C option better (diff)
downloadzsh-48df213153610e302b94c866f869a5861e359349.tar
zsh-48df213153610e302b94c866f869a5861e359349.tar.gz
zsh-48df213153610e302b94c866f869a5861e359349.tar.bz2
zsh-48df213153610e302b94c866f869a5861e359349.tar.lz
zsh-48df213153610e302b94c866f869a5861e359349.tar.xz
zsh-48df213153610e302b94c866f869a5861e359349.tar.zst
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_tags4
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