From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6854 invoked by alias); 2 Aug 2011 14:25:31 -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: 16184 Received: (qmail 1684 invoked from network); 2 Aug 2011 14:25:28 -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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at gmx.net designates 213.165.64.23 as permitted sender) X-Authenticated: #28939725 X-Provags-ID: V01U2FsdGVkX1+yWHlV1ASyJPM1Te/f7K9x0VF7JGvTGpsJVlgStJ KG9J1GLASsBSPn Message-ID: <4E380791.2090807@gmx.net> Date: Tue, 02 Aug 2011 16:20:01 +0200 From: Pascal Wittmann User-Agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110628 Thunderbird/5.0 MIME-Version: 1.0 To: zsh-users@zsh.org Subject: zle insert problems X-Enigmail-Version: 1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig82ABC1B0CA5B4F11C97D072B" X-Y-GMX-Trusted: 0 --------------enig82ABC1B0CA5B4F11C97D072B Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, I'm trying to build something like this: function do-something() { zle beginning-of-line zle -U "something" zle end-of-line } zle -N do-something bindkey "^[i]" do-something I assumed the commands are executed sequentially if I press M-i. In fact they are but the strings given to "zle -U" are written after the current widget is executed. So the result is: % this is a test pressing M-i % this is a testsomething Is there a way to flush this data earlier to get a result like: % sometingthis is a test Or is my approach totaly wrong? (This is the first time I use zle) Thanks in advance Pascal --------------enig82ABC1B0CA5B4F11C97D072B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEAREKAAYFAk44B5EACgkQyJms5+IyKFJeTQCcD5Vz277waT3yUj6tVsL6hLaz CssAn3+fkCh02dUGbkOHNvB+OU4OzK/z =lBYn -----END PGP SIGNATURE----- --------------enig82ABC1B0CA5B4F11C97D072B--