From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5926 invoked from network); 5 Jun 2007 18:13:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=no version=3.2.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 5 Jun 2007 18:13:21 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 88056 invoked from network); 5 Jun 2007 18:13:12 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Jun 2007 18:13:12 -0000 Received: (qmail 10580 invoked by alias); 5 Jun 2007 18:13:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23527 Received: (qmail 10571 invoked from network); 5 Jun 2007 18:13:09 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 5 Jun 2007 18:13:09 -0000 Received: (qmail 87687 invoked from network); 5 Jun 2007 18:13:09 -0000 Received: from cluster-c.mailcontrol.com (168.143.177.190) by a.mx.sunsite.dk with SMTP; 5 Jun 2007 18:13:05 -0000 Received: from rly21c.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly21c.srv.mailcontrol.com (MailControl) with ESMTP id l55ICl8e001377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 5 Jun 2007 19:12:56 +0100 Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly21c.srv.mailcontrol.com (MailControl) id l55ICbUO000805 for zsh-workers@sunsite.dk; Tue, 5 Jun 2007 19:12:37 +0100 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly21c-eth0.srv.mailcontrol.com (envelope-sender Peter.Stephenson@csr.com) (MIMEDefang) with ESMTP id l55ICZE1000625; Tue, 05 Jun 2007 19:12:37 +0100 (BST) Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Tue, 5 Jun 2007 19:12:34 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.8/8.13.4) with ESMTP id l55ICYfE004958; Tue, 5 Jun 2007 19:12:34 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.8/8.13.8/Submit) with ESMTP id l55ICXMM004955; Tue, 5 Jun 2007 19:12:34 +0100 Message-Id: <200706051812.l55ICXMM004955@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk (Zsh hackers list) Cc: Ken Williams Subject: Re: Buglet in zsh perforce completion function In-reply-to: References: Comments: In-reply-to Ken Williams message dated "Tue, 05 Jun 2007 11:55:57 -0500." Date: Tue, 05 Jun 2007 19:12:33 +0100 From: Peter Stephenson X-OriginalArrivalTime: 05 Jun 2007 18:12:34.0783 (UTC) FILETIME=[17694EF0:01C7A79D] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-07-07-05 (www.mailcontrol.com) on 10.67.1.131 I got this bug report... Ken Williams wrote: > I recently switched to zsh so that I could use your fantastic _perforce > completion function. =) I found a small bug in it that I'm not sure how to > rectify, but hopefully you will. > > When I'm completing a 'p4 diff -se' command, hitting can erase part of > the argument I'm typing, which is a drag if it's a long one. > > For example, here's a sequence I type: > > p4 diff -se data/w > > Type , completed to: > p4 diff -se data/workflow/ > > Type again, erased to: > p4 diff -se data > > Thereafter, if I bounce on the key it toggles between adding & > subtracting a slash after the "data" word. Although I don't get quite the same behaviour (probably due to options), I can see the / being removed and put back and no completion in the directory being added. This boils down to a bug with the following code: _tst1() { local dir=${PREFIX%%[^/]#} # The details of this don't matter much, only # the fact that it adds a completion with ... after the # directory. compadd -J subdirs -p $dir -W $dir ... } _tst() { _alternative "files:file:_path_files" "dots:dots:_tst1"; } compdef _tst tst Now completing after "tst" exhibits the same symptoms. I hadn't noticed because it's suppressed by some option I'm using, I think to do with tag grouping (but simply putting the subdirs in another group doesn't work, since that's what I've done in _tst1). Before I simply try to work round this, does anyone have the first clue what might be going on in the completion system to cause this? -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview