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

Re: bracketed paste mode in xterm and urxvt

On Wed, Jun 3, 2015 at 12:04 PM, Yuri D'Elia <wavexx@xxxxxxxxxx> wrote:
> On 06/03/2015 10:35 AM, Jesper Nygårds wrote:
>> I have a hard time figuring out how this is useful. Could you guys post
>> some examples of what you are using this function for?

It also makes every paste a single undo/redo point.

> Bracketed paste is of course useful for copy/paste in the terminal.
> In the 'safe-paste' oh-my-zsh plugin, the pasted text is not directly
> executed: the newlines are inserted as a multi-line command instead,
> which allow you to see the command before executing it instead.

It's probably worth noting that 'safe-paste' is a bad name for this,
since the pasted text can include the end-paste escape code, causing
the rest of the paste to appear to the shell as typed by the user.

This page has an example attack against the plugin,

Hm, seems newer xterm prohibits pasting raw escape codes, so if you
have one of those versions, you are safe.

Mikael Magnusson

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