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

Re: custom command completion for a zshdb, a REPL



On Mon, 9 May 2011 09:09:32 -0400
Rocky Bernstein <rocky.bernstein@xxxxxxxxx> wrote:
> I would like to add debugger command completion to the zsh debugger,
> zshdb.

You will need to use "vared" to read the line via ZLE and set a special
completion context.  Have a look at zcalc (Functions/Misc/zcalc) and
_zcalc_line (Completion/Zsh/Context/_zcalc_line).  The way they work
together is that zcalc defines a value for compcontext which corresponds
to the value in the "#compdef" line at the top of _zcalc_line.

Beyond that, it should be just a standard completion function project.

-- 
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



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