From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18982 invoked from network); 5 Apr 2000 08:22:58 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Apr 2000 08:22:58 -0000 Received: (qmail 22476 invoked by alias); 5 Apr 2000 08:22:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10498 Received: (qmail 22464 invoked from network); 5 Apr 2000 08:22:43 -0000 Date: Wed, 5 Apr 2000 10:22:39 +0200 (MET DST) Message-Id: <200004050822.KAA01633@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk Subject: PATCH: _next_tags Here is a bit of fixing to make it work correctly (as far as I can see) with file-patterns. Nothing new with respect to the combination of _next_tags and labels. And maybe there'll never be. Bye Sven Index: Completion/Commands/_next_tags =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Commands/_next_tags,v retrieving revision 1.3 diff -u -r1.3 _next_tags --- Completion/Commands/_next_tags 2000/04/04 11:26:26 1.3 +++ Completion/Commands/_next_tags 2000/04/05 08:20:37 @@ -92,12 +92,20 @@ 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 } -- Sven Wischnowsky wischnow@informatik.hu-berlin.de