From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24096 invoked from network); 1 Jul 2009 16:26:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from new-brage.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.254.104) by ns1.primenet.com.au with SMTP; 1 Jul 2009 16:26:19 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 36416 invoked from network); 1 Jul 2009 16:26:11 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 1 Jul 2009 16:26:11 -0000 Received: (qmail 5277 invoked by alias); 1 Jul 2009 16:26:02 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27085 Received: (qmail 5254 invoked from network); 1 Jul 2009 16:26:01 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 1 Jul 2009 16:26:01 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [85.115.60.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id B3B2A8027106 for ; Wed, 1 Jul 2009 18:25:49 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly49d.srv.mailcontrol.com (MailControl) with ESMTP id n61GMQPw023192 for ; Wed, 1 Jul 2009 17:25:48 +0100 Received: from news01.csr.com ([10.99.50.25]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Wed, 1 Jul 2009 17:24:05 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id n61GO5kI017022 for ; Wed, 1 Jul 2009 17:24:06 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id n61GO4vM017018 for ; Wed, 1 Jul 2009 17:24:05 +0100 Message-Id: <200907011624.n61GO4vM017018@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: PATCH: problem accepting completion in menu selection In-reply-to: <200907012005.13074.arvidjaar@gmail.com> References: <200907011131.n61BVFuT000608@news01.csr.com> <200907012005.13074.arvidjaar@gmail.com> Comments: In-reply-to Andrey Borzenkov message dated "Wed, 01 Jul 2009 20:05:12 +0400." Date: Wed, 01 Jul 2009 17:24:04 +0100 From: Peter Stephenson X-OriginalArrivalTime: 01 Jul 2009 16:24:05.0972 (UTC) FILETIME=[5A905140:01C9FA68] X-Scanned-By: MailControl A-09-00-10 (www.mailcontrol.com) on 10.68.0.159 X-Virus-Scanned: ClamAV 0.94.2/9531/Wed Jul 1 07:09:17 2009 on bifrost X-Virus-Status: Clean Andrey Borzenkov wrote: > Correction - it is not actually menu selection but rather display of > completion list which is different specie as far as I know. I did not > test whether I get the same with menu selection off though. It's behaviour in the zsh/complist module, yes, but there are two things it can do: show a list without selection (using the listscroll keymap), or select from a list (using the menuselect keymap). I haven't changed the former: space and return still scroll there. They were doing so in selection, too, which they shouldn't. I should, however, consistent with the previous patch, have made accept-search stop the listing without doing anything else. Then you can bindkey -M listscroll '\r' accept-search if you want Enter to exit the list instead of scrolling. Index: Doc/Zsh/mod_complist.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/mod_complist.yo,v retrieving revision 1.27 diff -u -r1.27 mod_complist.yo --- Doc/Zsh/mod_complist.yo 1 Jul 2009 13:41:24 -0000 1.27 +++ Doc/Zsh/mod_complist.yo 1 Jul 2009 16:19:57 -0000 @@ -193,6 +193,9 @@ item(tt(expand-or-complete-prefix), tt(menu-complete-or-expand))( scrolls forward one screenful ) +item(tt(accept-search))( +stop listing but take no other action +) enditem() Every other character stops listing and immediately processes the key Index: Src/Zle/complist.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v retrieving revision 1.120 diff -u -r1.120 complist.c --- Src/Zle/complist.c 1 Jul 2009 13:41:25 -0000 1.120 +++ Src/Zle/complist.c 1 Jul 2009 16:19:57 -0000 @@ -974,6 +974,8 @@ !strcmp(cmd->nam, "menu-complete") || !strcmp(cmd->nam, "menu-expand-or-complete")) mrestlines = lines - 1; + else if (cmd == Th(z_acceptsearch)) + ret = 1; else { ungetkeycmd(); ret = 1; -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070