From pws@csr.com Wed Jul 1 20:24:04 2009 Delivered-To: arvidjaar@gmail.com Received: by 10.220.73.85 with SMTP id p21cs486052vcj; Wed, 1 Jul 2009 09:26:21 -0700 (PDT) Received: by 10.211.179.6 with SMTP id g6mr6600158ebp.32.1246465580430; Wed, 01 Jul 2009 09:26:20 -0700 (PDT) Return-Path: <zsh-workers-return-27085-arvidjaar=gmail.com@sunsite.dk> Received: from a.mx.sunsite.dk ([130.225.254.104]) by mx.google.com with SMTP id 20si2349578ewy.65.2009.07.01.09.26.19; Wed, 01 Jul 2009 09:26:20 -0700 (PDT) Received-SPF: neutral (google.com: 130.225.254.104 is neither permitted nor denied by domain of zsh-workers-return-27085-arvidjaar=gmail.com@sunsite.dk) client-ip=130.225.254.104; Authentication-Results: mx.google.com; spf=neutral (google.com: 130.225.254.104 is neither permitted nor denied by domain of zsh-workers-return-27085-arvidjaar=gmail.com@sunsite.dk) smtp.mail=zsh-workers-return-27085-arvidjaar=gmail.com@sunsite.dk Received: (qmail 36644 invoked from network); 1 Jul 2009 16:26:16 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 1 Jul 2009 16:26:16 -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 Delivered-To: mailing list zsh-workers@sunsite.dk 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 <zsh-workers@sunsite.dk>; 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 <zsh-workers@sunsite.dk>; 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 <zsh-workers@sunsite.dk>; 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 <zsh-workers@sunsite.dk>; 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 <arvidjaar@gmail.com> message dated "Wed, 01 Jul 2009 20:05:12 +0400." Date: Wed, 01 Jul 2009 17:24:04 +0100 From: Peter Stephenson <pws@csr.com> 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-Spam-Status: No, score=-2.5 required=5.0 autolearn=no tests=BAYES_00, RDNS_NONE,UNPARSEABLE_RELAY version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bifrost X-Virus-Scanned: ClamAV 0.94.2/9531/Wed Jul 1 07:09:17 2009 on bifrost X-Virus-Status: Clean Status: R X-Status: N X-KMail-EncryptionState: X-KMail-SignatureState: X-KMail-MDN-Sent: 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 <pws@csr.com> Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070