From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23998 invoked by alias); 5 Mar 2014 12:46:59 -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: 32462 Received: (qmail 28635 invoked from network); 5 Mar 2014 12:46:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f4-b7f796d000005a13-9e-53171cb05c2b Date: Wed, 05 Mar 2014 12:46:39 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Writing a plugin - where to start? Message-id: <20140305124639.47167f22@pwslap01u.europe.root.pri> In-reply-to: References: Organization: Samsung Cambridge Solution Centre 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: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupiluLIzCtJLcpLzFFi42I5/e/4Vd0NMuLBBpv2cVocbH7I5MDoserg B6YAxigum5TUnMyy1CJ9uwSujD23BQoe8lR8ndzE1sA4lauLkZNDQsBE4sTJjYwQtpjEhXvr 2boYuTiEBJYySpxe2sII4SxnkvjX0srUxcjBwSKgKtH2PRGkgU3AUGLqptlgzSIC4hJn155n ASkRFtCXuHElACTMK2Av8ezeElYQm1MgWKLn4UY2EFtIIECiecE0dhCbH6j86t9PTBA32EvM vHKGEaJXUOLH5HssIDazgJbE5m1NrBC2tsSTdxdYJzAKzEJSNgtJ2SwkZQsYmVcxiqaWJhcU J6XnGuoVJ+YWl+al6yXn525ihITflx2Mi49ZHWIU4GBU4uF9wSEWLMSaWFZcmXuIUYKDWUmE t19cPFiINyWxsiq1KD++qDQntfgQIxMHp1QD4+qatVtlRWaHxL648N3jWfdM1SVsOxTcPlvN 2Dxp77cFJkW3osQ3Vi/jMy1duXfX01M7v6r/1jd2bDPb+1T3xR6xhI+FotsOpjvHx4v4xjWv E2RN//PPSusb8+yiH29+Tfwo1HSpoMeb0VPCRIiJ/+e0oCBBsePJnmf77/69N6s+J7X7VYRI uxJLcUaioRZzUXEiAL/S52wdAgAA On Tue, 04 Mar 2014 17:31:56 +0100 Timm Bla wrote: > I am new to zsh and I want to write a plugin. >=20 > For that I need to be able to change the output of the history. > So that when the user goes back or forth in the history (with the arrow > keys for example) my plugin gives back the output the user will see. >=20 > I went through the manual and looked at some other plugins but still don't > quite know where to start. > Maybe someone here can point me in the right direction? =46rom the lack of immediate responses, I think other people have had the same reaction as I did --- you're going to have to tell us what you're trying to plug into. Are you simply trying to make the line editor behaviour different? In that case, I suggest reading the zshzle manual page, which explains about the difference between builtin widgets (editor functions) and user defined ones, and how you create and use the latter. For a more touchy-feely guide to that, see http://zsh.sourceforge.net/Guide/zshguide04.html#l75 or chapter 14 of the book "From Bash to Z Shell" (see www.bash2zsh.com) If that is what the query is about, you have a great deal of flexibility at your disposal by using shell functions. This discussion is more appropriate for the zsh-users list. If you're trying to change the shell firmware in some more fundamental way, that may or may not be possible by writing an extension --- extensions can make use of various hooks in the main shell but only have limited ability to change built-in behaviour. So you'd have to spell out what you're trying to do. pws