From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9047 invoked by alias); 25 Oct 2011 16:29:27 -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: 29859 Received: (qmail 1452 invoked from network); 25 Oct 2011 16:29:25 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Tue, 25 Oct 2011 17:29:17 +0100 From: Peter Stephenson To: Subject: Re: compadd -- Message-ID: <20111025172917.63f56967@pwslap01u.europe.root.pri> In-Reply-To: <111025090445.ZM1600@torch.brasslantern.com> References: <111025090445.ZM1600@torch.brasslantern.com> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.101.11.233] X-Scanned-By: MailControl 7.6.3 (www.mailcontrol.com) on 10.68.0.133 On Tue, 25 Oct 2011 09:04:45 -0700 Bart Schaefer wrote: > The problem seems to be that the generic option parser has already > removed the "--" option before bin_compadd is even called, even though > the declaration > > BUILTIN("compadd", 0, bin_compadd, 0, -1, 0, NULL, NULL) > > says that compadd is going to do all its own option parsing. Except it doesn't. Are you saying we need this? (Possibly for other completion functions?) Index: Src/Zle/complete.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/complete.c,v retrieving revision 1.46 diff -p -u -r1.46 complete.c --- Src/Zle/complete.c 13 Jan 2009 12:19:54 -0000 1.46 +++ Src/Zle/complete.c 25 Oct 2011 16:27:41 -0000 @@ -1544,7 +1544,7 @@ cond_range(char **a, int id) } static struct builtin bintab[] = { - BUILTIN("compadd", 0, bin_compadd, 0, -1, 0, NULL, NULL), + BUILTIN("compadd", BINF_HANDLES_OPTS, bin_compadd, 0, -1, 0, NULL, NULL), BUILTIN("compset", 0, bin_compset, 1, 3, 0, NULL, NULL), }; -- 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 More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog