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

Re: PATCH: highlight pasted text



Yuri D'Elia wrote on Sun, Jul 19, 2015 at 14:13:39 +0200:
> On 19/07/15 04:50, Oliver Kiddle wrote:
> > How about the following patch? This adds another special token to
> > zle_highlight. So you can do, e.g: zle_highlight+=( paste:bg=87 )
> > This applies also for vi put and emacs yank commands.
> 
> This is sweet. I can safely say this gives a great indication of the
> state of the shell, and fixes the behavior of the literal paste in any
> condition.
> 
> But chopping off that newline if it's the last character... hmm, I still
> think that's a good idea.

I'd rather text be pasted verbatim (for a number of reasons, I can
elaborate if needed).  How about doing

    zle -M "Press <Enter> to execute"

if the pasted text ends with a newline?



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