From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28070 invoked by alias); 10 May 2011 09:59:33 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16011 Received: (qmail 4377 invoked from network); 10 May 2011 09:59:31 -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, 10 May 2011 10:59:17 +0100 From: Peter Stephenson To: Subject: Re: custom command completion for a zshdb, a REPL Message-ID: <20110510105917.0b9aa527@pwslap01u.europe.root.pri> In-Reply-To: References: 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.103.11.49] X-Scanned-By: MailControl A_10_80_00 (www.mailcontrol.com) on 10.68.0.128 On Mon, 9 May 2011 09:09:32 -0400 Rocky Bernstein 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 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