From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12576 invoked from network); 3 Oct 2007 16:13:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Oct 2007 16:13:19 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 90128 invoked from network); 3 Oct 2007 16:13:12 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Oct 2007 16:13:12 -0000 Received: (qmail 17643 invoked by alias); 3 Oct 2007 16:12:59 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23900 Received: (qmail 17498 invoked from network); 3 Oct 2007 16:12:58 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 3 Oct 2007 16:12:58 -0000 Received: (qmail 87583 invoked from network); 3 Oct 2007 16:12:58 -0000 Received: from cluster-g.mailcontrol.com (85.115.41.190) by a.mx.sunsite.dk with SMTP; 3 Oct 2007 16:12:51 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly12g.srv.mailcontrol.com (MailControl) with ESMTP id l93GCIZN019439 for ; Wed, 3 Oct 2007 17:12:40 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Wed, 3 Oct 2007 17:12:37 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.1/8.13.4) with ESMTP id l93GCa2t029289 for ; Wed, 3 Oct 2007 17:12:37 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.14.1/8.14.1/Submit) with ESMTP id l93GCajn029286 for ; Wed, 3 Oct 2007 17:12:36 +0100 Message-Id: <200710031612.l93GCajn029286@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: Allow completion to work with files starting with = (equal sign) In-reply-to: <200710031527.l93FRSXS016734@news01.csr.com> References: <19c433eb0710030742ya478e23ldb2854ca0e9a4faa@mail.gmail.com> <200710031527.l93FRSXS016734@news01.csr.com> Comments: In-reply-to Peter Stephenson message dated "Wed, 03 Oct 2007 16:27:28 +0100." Date: Wed, 03 Oct 2007 17:12:35 +0100 From: Peter Stephenson X-OriginalArrivalTime: 03 Oct 2007 16:12:37.0132 (UTC) FILETIME=[36D8ECC0:01C805D8] X-Scanned-By: MailControl A-07-08-10 (www.mailcontrol.com) on 10.71.0.122 I quite like this patch anyway, though I think new completion already handles this. Index: Src/Zle/compctl.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/compctl.c,v retrieving revision 1.34 diff -u -r1.34 compctl.c --- Src/Zle/compctl.c 6 Jul 2007 21:52:40 -0000 1.34 +++ Src/Zle/compctl.c 3 Oct 2007 16:09:51 -0000 @@ -3501,7 +3501,7 @@ p++; /* Get the pattern string. */ tokenize(g = dupstrpfx(g, p - g)); - if (*g == '=') + if (*g == '=' && isset(EQUALS)) *g = Equals; if (*g == '~') *g = Tilde; Index: Src/Zle/zle_tricky.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_tricky.c,v retrieving revision 1.88 diff -u -r1.88 zle_tricky.c --- Src/Zle/zle_tricky.c 30 Aug 2007 21:46:02 -0000 1.88 +++ Src/Zle/zle_tricky.c 3 Oct 2007 16:09:52 -0000 @@ -1608,6 +1608,13 @@ *q = Bnull; } } + /* + * Leading "=" gets tokenized in case the EQUALS options + * changes afterwards. It's too late for that now, so restore it + * to a plain "=" if the option is unset. + */ + if (*s == Equals && !isset(EQUALS)) + *s = '='; /* While building the quoted form, we also clean up the command line. */ for (p = s, i = wb, j = 0; *p; p++, i++) { int skipchars; -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070