zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.dk
Subject: Re: Two missing completion functions that bug me
Date: Fri, 30 Mar 2001 10:23:15 +0200 (MET DST)	[thread overview]
Message-ID: <200103300823.KAA22448@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Sven Wischnowsky's message of Fri, 30 Mar 2001 10:21:08 +0200 (MET DST)


I wrote:

> ...
> 
> You could try the patch below ...

Ahem.

Bye
 Sven

Index: Completion/Base/_arguments
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/_arguments,v
retrieving revision 1.34
diff -u -r1.34 _arguments
--- Completion/Base/_arguments	2001/03/28 09:50:38	1.34
+++ Completion/Base/_arguments	2001/03/30 08:22:57
@@ -335,14 +335,16 @@
           if [[ "$single" = direct ]]; then
             _all_labels options expl option \
 	        compadd -QS '' - "${PREFIX}${SUFFIX}"
-          elif [[ "$single" = next ]]; then
-            _all_labels options expl option \
-	        compadd -Q - "${PREFIX}${SUFFIX}"
           elif [[ "$single" = equal ]]; then
             _all_labels options expl option \
 	        compadd -QqS= - "${PREFIX}${SUFFIX}"
           else
+
 	    tmp1=( "$next[@]" "$direct[@]" "$odirect[@]" "$equal[@]" )
+
+            [[ "$single" = next ]] &&
+                tmp1=( "${(@)tmp1:#[-+]${PREFIX[-1]}((#e)|:*)}" )
+
 	    [[ "$PREFIX" != --* ]] && tmp1=( "${(@)tmp1:#--*}" )
 	    tmp3=( "${(M@)tmp1:#[-+]?[^:]*}" )
 	    tmp1=( "${(M@)tmp1:#[-+]?(|:*)}" )
@@ -351,6 +353,11 @@
             _describe -o option \
                       tmp1 tmp2 -Q -S '' -- \
 		      tmp3 -Q
+
+            [[ "$single" = next && nm -eq $compstate[nmatches] ]] &&
+                _all_labels options expl option \
+	            compadd -Q - "${PREFIX}${SUFFIX}"
+
           fi
           single=yes
         else

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~2001-03-30  8:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-30  8:23 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-04-02  9:15 Sven Wischnowsky
2001-04-02 12:04 ` Oliver Kiddle
2001-03-30  8:21 Sven Wischnowsky
2001-03-30 16:11 ` Bart Schaefer
2001-03-29  7:59 Bart Schaefer
2001-03-29 10:09 ` Oliver Kiddle
2001-03-29 16:24   ` Bart Schaefer
2001-03-30  9:16     ` Oliver Kiddle
2001-03-30 15:38       ` Bart Schaefer
2001-03-30 15:59         ` Bart Schaefer
2001-03-30 16:35         ` Oliver Kiddle
2001-03-30 16:53           ` Bart Schaefer

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=200103300823.KAA22448@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.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).