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

Re: PATCH: highlight pasted text



On Jul 19,  5:12pm, Daniel Shahaf wrote:
} Subject: Re: PATCH: highlight pasted text
}
} Yuri D'Elia wrote on Sun, Jul 19, 2015 at 14:13:39 +0200:
} > 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?

The question is what to do in the default (built-in widget) case.  Yes,
the built-in widget could do something equivalent to that, but the
message is context-dependent; if you're pasting into a here-document,
for example, pressing enter won't execute anything.

It'd make more sense to (for example) always show the PS2 prompt after
a paste that contains a newline, because that can both describe the
context and indicate that the shell is waiting for more input.



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