zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: _next_tags
Date: Wed, 5 Apr 2000 10:22:39 +0200 (MET DST)	[thread overview]
Message-ID: <200004050822.KAA01633@beta.informatik.hu-berlin.de> (raw)


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


             reply	other threads:[~2000-04-05  8:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-05  8:22 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-03-23  9:43 Sven Wischnowsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200004050822.KAA01633@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).