diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Completion/Commands/_next_tags | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index e18ff3d11..07811c90f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-04-05 Sven Wischnowsky <wischnow@informatik.hu-berlin.de> + + * 10498: Completion/Commands/_next_tags: fix for handling + file-patterns. + 2000-04-04 Peter Stephenson <pws@pwstephenson.fsnet.co.uk> * Clint: 10477: Functions/Zftp/zfcd_match: some awks don't like 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 } |