Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: zsh-3.1.5-pws-6: bash-style completion
- X-seq: zsh-workers 5234
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: zsh-3.1.5-pws-6: bash-style completion
- Date: Thu, 4 Feb 1999 15:05:23 +0100 (MET)
- In-reply-to: Peter Stephenson's message of Thu, 04 Feb 1999 12:22:32 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Peter Stephenson wrote:
> I've also been having strange effects when combining all this with:
> compctl -M 'm:{a-z}={A-Z}' 'r:|[.,_-]=* r:|=*'
> but I haven't tracked it down (and it's there anyway, I just normally
> use menu completion so hadn't noticed). I think there may be a
> problem with `compctl -M' on its own, too, since I got a crash after
> that once.
Hm, I haven't found any unusual behavior here, so I guess, I need an
example.
>From the patch in do_ambiguous():
> * 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). */
> if(isset(LISTAMBIGUOUS) && !isset(BASHAUTOLIST) && !am &&
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.
Bye
Sven
--- Src/Zle/zle_tricky.c.old Thu Feb 4 14:53:53 1999
+++ Src/Zle/zle_tricky.c Thu Feb 4 14:59:31 1999
@@ -303,7 +303,7 @@
else {
if (lastambig == 1 && isset(BASHAUTOLIST) && !usemenu && !menucmp) {
docomplete(COMP_LIST_COMPLETE);
- lastambig == 2;
+ lastambig = 2;
} else
docomplete(COMP_COMPLETE);
}
@@ -5484,7 +5484,7 @@
* 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). */
- if(isset(LISTAMBIGUOUS) && !isset(BASHAUTOLIST) && !am &&
+ if(isset(LISTAMBIGUOUS) && !am &&
(ics != cs || (ainfo->suflen && !atend))) {
invalidatelist();
lastambig = 0;
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author