From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16730 invoked from network); 27 Jul 2000 17:20:05 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Jul 2000 17:20:05 -0000 Received: (qmail 7643 invoked by alias); 27 Jul 2000 17:19:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12412 Received: (qmail 7636 invoked from network); 27 Jul 2000 17:19:39 -0000 From: "Bart Schaefer" Message-Id: <1000727171932.ZM8725@candle.brasslantern.com> Date: Thu, 27 Jul 2000 17:19:31 +0000 In-Reply-To: <200007271058.MAA17400@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: zstyle question: enter menu selection on lots of ambiguity" (Jul 27, 12:58pm) References: <200007271058.MAA17400@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: zstyle question: enter menu selection on lots of ambiguity MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 27, 12:58pm, Sven Wischnowsky wrote: } Subject: Re: zstyle question: enter menu selection on lots of ambiguity } } Bart Schaefer wrote: } } > If I use both, I get menu-selection on the second tab and on C-d, and } > sometimes more of the strange behavior (the same match inserted on the } > line multiple times and stuff like that -- I think it happens if you hit } > C-d repeatedly after completion or selection has started when the match } > on the line (highlighted, in selection) is NOT a directory). } } That perfectly ok'ish, actually. The ^D leaves menu selection, keeping } the currently selected match on the line, and makes the widget bound } to it be executed. Hmm, I'm not sure how to react to that. C-d doesn't stop normal menu completion; you have to type space or slash or whatever to "accept" the match before generating a new list. I suppose that's because in the absence of `autolist' there won't be any listing yet, whereas with menu- selection there's always a listing. } So, with this patch, you can do: } } zstyle ':completion:*' menu yes=long select=long } } if you want selection only if the list is too long for the screen. } Of course you can also combine it with `select='. OK, great, thanks! So now ... how do I combine it with select= in such a way that I get menu-selection on the first tab when the list is too long for the screen and on the second tab when the list is more than elements long? E.g. on a 80x24 display, yes=long select=30 would work most of the time; but if each match were more than 40 characters wide, fewer than 30 of them would still be more than a screenful. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net