Zsh Mailing List Archive
Messages sorted by:
Re: bracketed paste mode in xterm and urxvt
- X-seq: zsh-users 20248
- From: Jesper Nygårds <jesper.nygards@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: bracketed paste mode in xterm and urxvt
- Date: Wed, 3 Jun 2015 12:14:56 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Z//z9kA77CJ5Le+x7HHgV/T3mm3NqwhspHMZC5XCXHU=; b=YLljaDfI8qozubMkeFbJBS6F61+NhHMOgtbwDhgl9Dk12yu4DbaKGlT3y4WWIDCnZk leD3EVOmplaD7wfpsykDpdVUOoEQxRLbMjSBVUG/lyZQ1KaOKjeV89aCGA8eWUuhPbVd +gyNLzo91oONnvEXIqks9T3PiryX7UURZPn4iydl5TgqL/CoQwXTiJ9iWSmVB0Wxo70h IPVYRmX00vqHE2gZBbYPzHQXtHu4re0G5mUEH3+85O8RArncc6QIQ5CTAceqAxG0ArAW lm607zusIf3YiemAaMVLm4arZ7pJAzKpk/aYm5EEj3iC3nDYZVD9tcKgI3L+s5IYCTZQ jXFg==
- In-reply-to: <firstname.lastname@example.org>
- List-help: <mailto:email@example.com>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <BANLkTikh_-+L2W5=Yfu7h7iAe5CcpP6fxw@mail.gmail.com> <CAFOazAOfk=Sq-smkMGzJKO4b7jMb_1_m4vXXn8twoVA2wV55YA@mail.gmail.com> <55677AF5.email@example.com> <firstname.lastname@example.org> <CABZhJg_5p8BLbq82s_wVtsPdD5hVtk-cPg6fNxzbSs4Vg00SOw@mail.gmail.com> <email@example.com>
OK, I see. I already use url-quote-magic for pasting urls, but I can see
the advantage of also being able to edit the paste before it's really
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?
> Bracketed paste is of course useful for copy/paste in the terminal.
> When pasting in a terminal, normally the shell receives the raw input,
> including newlines, quotes and the like. There's no difference between
> typing and pasting. For example, often you want to select a code snippet
> from a web page, and the page might include extra markup that breaks the
> command and/or runs it directly even when you're careful.
> Besides being dangerous, it's also annoying that you need to quote the
> pasted text manually. For example
> wget <paste url>
> will often fail if the url contains ?. You need to edit the command and
> quote it. Annoying.
> Bracketed paste is implemented by the terminal+shell: the terminal sends
> control sequences during paste that allow the shell to know that
> something is being paste as opposed to being typed. The shell can then
> act accordingly.
> 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.
> In the posted examples, you can actually chose if the pasted text should
> be literal or quoted. With quoted paste, you can pass urls and similar
> blocks of text as command arguments without having to fudge it.
Messages sorted by: