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

Re: "Literal" command execution



On Mon, 23 Jan 2012 14:32:09 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

> Have a look at Functions/Zle/url-quote-magic, which relies on being able
> to substitute itself for the self-insert ZLE builtin.  You can skip over
> the introductory comments about zstyles and focus on the function at the
> end of the file, particularly the way it analyzes $KEYS and modifies
> $LBUFFER.

Thank you Bart (and also Damien) for this suggestion.
This is indeed a step in the right direction.

> A difficulty with this technique is that it becomes difficult to cascade
> it with other similar techniques; ZLE doesn't have emacs' concept of
> "advice" around a keybinding.

I think I can simplify it a lot, by basically escaping everything unless it already starts in quotes.

I'm just missing this: can I substitute self-insert just for a specific zstyle? This way I could make it work just for a specific command?



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