diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-05 08:24:59 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-05 08:24:59 +0000 |
commit | bcd865f7d2f09fb42c755f0ad7f26f7ed26a60f0 (patch) | |
tree | 54c0d26ca52b0fe75e5998fa0512d8eb7779b583 /Completion | |
parent | 2c8d808759e6e158c81329e474e4c4c84f8b50f7 (diff) | |
download | zsh-bcd865f7d2f09fb42c755f0ad7f26f7ed26a60f0.tar.gz zsh-bcd865f7d2f09fb42c755f0ad7f26f7ed26a60f0.tar.xz zsh-bcd865f7d2f09fb42c755f0ad7f26f7ed26a60f0.zip |
fix for combining _next_tags and file-patterns
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Commands/_next_tags | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Completion/Commands/_next_tags b/Completion/Commands/_next_tags index 867cf0b98..d9a5f08d8 100644 --- a/Completion/Commands/_next_tags +++ b/Completion/Commands/_next_tags @@ -92,12 +92,20 @@ _next_tags_sort() { if [[ -z "$nodef" ]]; then if [[ $funcstack[4] = _files ]]; then if zstyle -a ":completion:${curcontext}:" file-patterns tmp; then - [[ "$argv" = *${${tmp[-1]##[^\\]:}%:*}* ]] && _next_tags_reset=yes + [[ "$argv" = *${${tmp[-1]#*[^\\]:}%:*}* ]] && _next_tags_reset=yes else [[ "$argv" = *all-files* ]] && _next_tags_reset=yes fi fi - comptry "${(@)argv:#(${(j:|:)~${=_next_tags_not}})(|:*)}" + tmp=( "${(@)argv:#(${(j:|:)~${=_next_tags_not}})(|:*)}" ) + + # $prev is set in _tags! + + if [[ -n "$prev" && ( $#tmp -ne 0 || $funcstack[4] = _files ) ]]; then + comptry "$tmp[@]" + else + comptry "$argv[@]" + fi fi } |