From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8587 invoked by alias); 11 Sep 2012 15:21:23 -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: 17261 Received: (qmail 17597 invoked from network); 11 Sep 2012 15:21:10 -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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at gmx.net designates 213.165.64.22 as permitted sender) X-Authenticated: #28939725 X-Provags-ID: V01U2FsdGVkX19JpgF4PxRJHl1T1bP+ZTWDUAbeaSE/oaNqtyJJ4T Hn62fIl4eKFS5+ Message-ID: <504F56E0.90809@gmx.net> Date: Tue, 11 Sep 2012 17:21:04 +0200 From: Pascal Wittmann User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: zsh-users@zsh.org Subject: Re: Magic-Backspace References: <504EED6B.7030403@gmx.net> <120911080919.ZM19507@torch.brasslantern.com> In-Reply-To: <120911080919.ZM19507@torch.brasslantern.com> X-Enigmail-Version: 1.4.4 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigA42BD26D7BEFF363A658E3F1" X-Y-GMX-Trusted: 0 --------------enigA42BD26D7BEFF363A658E3F1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 09/11/2012 05:09 PM, Bart Schaefer wrote: > On Sep 11, 9:51am, Pascal Wittmann wrote: > } > } I thought of implementing some magic-backspace that removes character= s > } until the 'current' completion is ambiguous (i.e. some extended versi= on > } of undo). > }=20 > } The problem I'm facing is that I can not find out if the current > } completion is ambiguous. Is this possible at all? >=20 > This is a rather tricky thing to attempt because the completion system > is a bit more than just a ZLE widget. Completion wants to have control= > of the editing process, i.e., you get *either* direct manipulation of > the editor buffer with BUFFER, LBUFFER, RBUFFER, etc., *or* you get the= > completion system mucking about in the buffer as it deems necessary, > but not both at once. >=20 [snip] >=20 > Obviously there's a whole lot of stuff I've glossed over here. What > should your widget do if invoked in the middle of a word instead of > at the end? What state do you need to clear before, or set after, > calling the completion widget to avoid entering menu completion or > displaying a listing? And so on. >=20 > Have fun! >=20 Thanks for all these pointers! Now I've a starting point. --------------enigA42BD26D7BEFF363A658E3F1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEAREKAAYFAlBPVuAACgkQyJms5+IyKFIhtQCbBoU15cQiedIwGON/u4ga/EUn bHAAnj/2CZyZFgMgaNbQwG68zU9VrEEy =Evgp -----END PGP SIGNATURE----- --------------enigA42BD26D7BEFF363A658E3F1--