From: Mikael Magnusson <mikachu@gmail.com>
To: "Yuri D'Elia" <wavexx@thregr.org>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: bracketed paste mode in xterm and urxvt
Date: Wed, 3 Jun 2015 14:06:05 +0200 [thread overview]
Message-ID: <CAHYJk3T3dVdN5qDMecPAH_ALLBYNntW0QVdPMh50Lo_ULeWP6w@mail.gmail.com> (raw)
In-Reply-To: <mkmjfu$3h0$1@ger.gmane.org>
On Wed, Jun 3, 2015 at 12:04 PM, Yuri D'Elia <wavexx@thregr.org> 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,
https://thejh.net/misc/website-terminal-copy-paste
Hm, seems newer xterm prohibits pasting raw escape codes, so if you
have one of those versions, you are safe.
--
Mikael Magnusson
next prev parent reply other threads:[~2015-06-03 12:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-22 19:16 Mikael Magnusson
2015-05-28 11:42 ` Jérémie Roquet
2015-05-28 19:16 ` Yuri D'Elia
2015-05-28 20:30 ` Daniel Hahler
2015-05-28 22:30 ` Bart Schaefer
2015-05-29 10:00 ` Yuri D'Elia
2015-06-03 8:35 ` Jesper Nygårds
2015-06-03 8:48 ` toki clover
2015-06-03 10:04 ` Yuri D'Elia
2015-06-03 10:14 ` Jesper Nygårds
2015-06-03 12:06 ` Mikael Magnusson [this message]
2015-06-03 14:01 ` Yuri D'Elia
2015-06-06 8:51 ` toki clover
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHYJk3T3dVdN5qDMecPAH_ALLBYNntW0QVdPMh50Lo_ULeWP6w@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=wavexx@thregr.org \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).