From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5572 invoked by alias); 18 Mar 2010 17:59:26 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27808 Received: (qmail 16432 invoked from network); 18 Mar 2010 17:59:15 -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=-3.0 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Message-Id: <201003181759.o2IHx81I017112@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@zsh.org Subject: Re: Update to _files in 27780 breaks chmod completion In-reply-to: <20100318174942.GA1373@ruderich.org> References: <20100318163028.GA9043@ruderich.org> <201003181704.o2IH4Ixw016423@news01.csr.com> <20100318174942.GA1373@ruderich.org> Comments: In-reply-to Simon Ruderich message dated "Thu, 18 Mar 2010 18:49:42 +0100." Date: Thu, 18 Mar 2010 17:59:08 +0000 From: Peter Stephenson X-OriginalArrivalTime: 18 Mar 2010 17:59:08.0374 (UTC) FILETIME=[B4DCCF60:01CAC6C4] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A_09_30_00 (www.mailcontrol.com) on 10.68.0.150 Simon Ruderich wrote: > On Thu, Mar 18, 2010 at 05:04:17PM +0000, Peter Stephenson wrote: > > If you read that message, you'll find that's exactly what *didn't* work > > for me before and *does* work now (as I just confirmed again). > > > > Are you sure you've got the latest executable as well as the latest > > functions? The code changed in the patch for users/14905. > > Ah, that's the problem. I'm using Zsh 4.3.6 with a current > checkout of the completion functions. Until now that always > worked perfectly. > > Is there any chance this can still be supported or should I just > unapply the patch locally? Generally there's never any guarantee that functions with one distribution will work with another, since in all "production" installations this isn't an issue as $fpath is set appropriately. However, I think the following should work in both versions and I'd be interested to hear about it going wrong... In fact I'm not sure why the code uses ":gs" instead off "//" which is a more obvious operator at this point. Possibly the latter used to be flakey. Index: Completion/Unix/Type/_files =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_files,v retrieving revision 1.12 diff -p -u -r1.12 _files --- Completion/Unix/Type/_files 15 Mar 2010 10:19:38 -0000 1.12 +++ Completion/Unix/Type/_files 18 Mar 2010 17:56:11 -0000 @@ -90,7 +90,7 @@ fi tried=() for def in "$pats[@]"; do - eval "def=( ${${def:gs/\\:/\\\\\\:}//(#b)([][()|*?^#~<>])/\\${match[1]}} )" + eval "def=( ${${def//\\:/\\\\\\:}//(#b)([][()|*?^#~<>])/\\${match[1]}} )" tmp="${(@M)def#*[^\\]:}" (( $tried[(I)${(q)tmp}] )) && continue -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom