zsh-workers
 help / color / mirror / code / Atom feed
* Re: accept-and-infer-next-history in menu selection
@ 1999-07-08  8:58 Sven Wischnowsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 1999-07-08  8:58 UTC (permalink / raw)
  To: zsh-workers


Peter Stephenson wrote:

> I can't get accept-and-infer-next-history to work in menu selection at
> all.  It simply cycles round to the next match.  What could I be doing
> wrong?

Hm. It works for me (even without the patch below). What I'm doing is:

  bindkey -M menuselect / accept-and-infer-next-history

then select e.g. a directory and hit / -- for me this continues
completion in the selected directory.

The patch fixes a small problem when a-a-i-n-h'ing a something
unambiguous (the list was left in place).

Bye
 Sven

diff -u os/Zle/complist.c Src/Zle/complist.c
--- os/Zle/complist.c	Wed Jul  7 11:28:49 1999
+++ Src/Zle/complist.c	Thu Jul  8 10:53:17 1999
@@ -697,6 +697,8 @@
 	    menucomplete(zlenoargs);
 	    if (dat->num < 2 || !minfo.cur || !*(minfo.cur)) {
 		noselect = 1;
+		clearlist = 1;
+		zrefresh();
 		break;
 	    }
 	    clearlist = 1;

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: accept-and-infer-next-history in menu selection
@ 1999-07-08 11:55 Sven Wischnowsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 1999-07-08 11:55 UTC (permalink / raw)
  To: zsh-workers


Peter Stephenson wrote:

> Peter Stephenson wrote:
> > I can't get accept-and-infer-next-history to work in menu selection at
> > all.  It simply cycles round to the next match.  What could I be doing
> > wrong?
> 
> I've tracked it down: it's incompatible with the _oldlist key oldlist_menu,
> which says to keep the old menu.  As far as I can see, it has no way of
> knowing that you really want to try a different completion at that point,
> so there's no way of using _oldlist here.

Throwing away the old list before stepping down might be a good idea
anyway...

Bye
 Sven

diff -u os/Zle/complist.c Src/Zle/complist.c
--- os/Zle/complist.c	Thu Jul  8 11:11:37 1999
+++ Src/Zle/complist.c	Thu Jul  8 13:51:41 1999
@@ -694,6 +694,8 @@
 	    break;
 	} else if (cmd == Th(z_acceptandinfernexthistory)) {
 	    menucmp = 0;
+	    fixsuffix();
+	    invalidatelist();
 	    menucomplete(zlenoargs);
 	    if (dat->num < 2 || !minfo.cur || !*(minfo.cur)) {
 		noselect = 1;

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: accept-and-infer-next-history in menu selection
  1999-07-08  8:19 Peter Stephenson
@ 1999-07-08  8:37 ` Peter Stephenson
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 1999-07-08  8:37 UTC (permalink / raw)
  To: Zsh hackers list

Peter Stephenson wrote:
> I can't get accept-and-infer-next-history to work in menu selection at
> all.  It simply cycles round to the next match.  What could I be doing
> wrong?

I've tracked it down: it's incompatible with the _oldlist key oldlist_menu,
which says to keep the old menu.  As far as I can see, it has no way of
knowing that you really want to try a different completion at that point,
so there's no way of using _oldlist here.

-- 
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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* accept-and-infer-next-history in menu selection
@ 1999-07-08  8:19 Peter Stephenson
  1999-07-08  8:37 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 1999-07-08  8:19 UTC (permalink / raw)
  To: Zsh hackers list

I can't get accept-and-infer-next-history to work in menu selection at
all.  It simply cycles round to the next match.  What could I be doing
wrong?

-- 
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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-07-08 11:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-08  8:58 accept-and-infer-next-history in menu selection Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
1999-07-08 11:55 Sven Wischnowsky
1999-07-08  8:19 Peter Stephenson
1999-07-08  8:37 ` Peter Stephenson

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).