zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: zsh-3.1.5-pws-6: bash-style completion
Date: Thu, 04 Feb 1999 15:12:57 +0100	[thread overview]
Message-ID: <9902041412.AA37396@ibmth.df.unipi.it> (raw)
In-Reply-To: "Sven Wischnowsky"'s message of "Thu, 04 Feb 1999 15:05:23 NFT." <199902041405.PAA17387@beta.informatik.hu-berlin.de>

Sven Wischnowsky wrote:
> > I've also been having strange effects when combining all this with:
> >   compctl -M 'm:{a-z}={A-Z}' 'r:|[.,_-]=* r:|=*'
> 
> Hm, I haven't found any unusual behavior here, so I guess, I need an
> example.

The following alone works for me, in the Src directory of the
distribution where z<TAB> is ambiguous.

% zsh -f
% compctl -M 'm:{a-z}={A-Z}' 'r:|[.,_-]=* r:|=*'
% echo z<TAB>
       ^cursor is now over the z.

Now delete the line with ^U, enter `compctl -M', and try the same
example again, and the shell dies.

> I have only a bash-2.01.1 here but that version shows the behavior to
> list the matches only on the third TAB: 1) insert unambiguous prefix,
> 2) do nothing, 3) show list. If the unambiguous prefix was completely
> typed (not automatically inserted), it first does nothing and shows
> the list on the second TAB. So I'd vote for removing the test, see the 
> patch below which also fixes a typo in your patch. Otherwise using
> BASHAUTOLIST will be the same as LISTAMBIGUOUS+AUTOLIST if the
> unambiguous prefix had to be automatically inserted.

That's fine by me; you can unset LISTAMBIGUOUS to get the other
behaviour.  The patch changes the documentation.

However, I'm having problems with LISTAMBIGUOUS when RECEXACT is set,
because `am' then gets set a few lines above that, apparently even if
there isn't an exact completion, and the chunk in question is skipped.
Any ideas?

--- Doc/Zsh/options.yo.2t2	Thu Feb  4 11:45:49 1999
+++ Doc/Zsh/options.yo	Thu Feb  4 15:06:20 1999
@@ -155,9 +155,9 @@
 item(tt(BASH_AUTO_LIST))(
 On an ambiguous completion, automatically list choices when the
 completion function is called twice in succession.  This takes
-precedence over tt(AUTO_LIST) and tt(LIST_AMBIGUOUS).  If
-tt(AUTO_MENU) is set, the menu behaviour will then start with the
-third press.
+precedence over tt(AUTO_LIST).  The setting of tt(LIST_AMBIGUOUS) is
+respected.  If tt(AUTO_MENU) is set, the menu behaviour will then start
+with the third press.
 )
 pindex(BEEP)
 cindex(beep, enabling)
@@ -497,10 +497,12 @@
 cindex(ambiguous completion)
 cindex(completion, ambiguous)
 item(tt(LIST_AMBIGUOUS))(
-This option works when tt(AUTO_LIST) is also set.  If there is an
-unambiguous prefix to insert on the command line, that is done without
-a completion list being displayed; in other words, auto-listing
-behaviour only takes place when nothing would be inserted.
+This option works when tt(AUTO_LIST) or tt(BASH_AUTO_LIST) is also
+set.  If there is an unambiguous prefix to insert on the command line,
+that is done without a completion list being displayed; in other
+words, auto-listing behaviour only takes place when nothing would be
+inserted.  In the case of tt(BASH_AUTO_LIST), this means that the list
+will be delayed to the third call of the function.
 )
 pindex(LIST_BEEP)
 cindex(beep, ambiguous completion)
--- Src/Zle/zle_tricky.c.2t2	Thu Feb  4 14:51:56 1999
+++ Src/Zle/zle_tricky.c	Thu Feb  4 15:02:28 1999
@@ -5479,11 +5479,7 @@
 	 * if the completion is completely ambiguous') is set, and some    *
 	 * prefix was inserted, return now, bypassing the list-displaying  *
 	 * code.  On the way, invalidate the list and note that we don't   *
-	 * want to enter an AUTO_MENU imediately.                          *
-	 *                                                                 *
-	 * We don't do this when BASH_AUTO_LIST is set, because that would *
-	 * mean you only got a completion list the third time you hit tab  *
-	 * (or whichever key).                                             */
+	 * want to enter an AUTO_MENU imediately.                          */
 	if(isset(LISTAMBIGUOUS) && !am &&
 	   (ics != cs || (ainfo->suflen && !atend))) {
 	    invalidatelist();


-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


  reply	other threads:[~1999-02-04 14:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-04 14:05 Sven Wischnowsky
1999-02-04 14:12 ` Peter Stephenson [this message]
1999-02-04 15:26   ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
1999-02-05  9:51 Sven Wischnowsky
1999-02-05  8:28 Sven Wischnowsky
1999-02-05  9:17 ` Peter Stephenson
1999-02-04 14:40 Dag-Erling Smorgrav
1999-02-04 11:48 Sven Wischnowsky
1999-02-04  8:15 [PATCH] " Sven Wischnowsky
1999-02-04 11:22 ` PATCH: zsh-3.1.5-pws-6: " Peter Stephenson

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=9902041412.AA37396@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --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).