Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: compadd --



On Tue, 25 Oct 2011 09:04:45 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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 <pws@xxxxxxx>            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



Messages sorted by: Reverse Date, Date, Thread, Author