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

Re: Magic-Backspace

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 characters
> } until the 'current' completion is ambiguous (i.e. some extended version
> } of undo).
> } 
> } The problem I'm facing is that I can not find out if the current
> } completion is ambiguous. Is this possible at all?
> 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.


> 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.
> Have fun!

Thanks for all these pointers! Now I've a starting point.

Attachment: signature.asc
Description: OpenPGP digital signature

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