From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 496 invoked by alias); 3 Jun 2015 12:06:12 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20249 Received: (qmail 1506 invoked from network); 3 Jun 2015 12:06:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 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 :cc:content-type:content-transfer-encoding; bh=5lkIacq21mX6WFeF8rhNE4+CSXFp6iubVUKA71XCIag=; b=e6UQxDVQz/tldccp6eWV7XsEmR/7b6G+K8kHPPD9BpMk7DSpmS9Wgu/Bj7kWtpQ0jw rTiC/YjmutinB2DTdYe7vqF4wyrLympxkCzowx1ALGyTXXg/xZADVOTezr0aBFOI23vF 5TB7QBe8AD+XrRLYNh2N9EPzXqe6JVse4q+8sesft7OAoASsxbgATrSh/pddKmc2htKX Bm2J/gjN52HCCuYlk4juY8kGskdSH0gVURskT92if7zvr9kvZ/vpPktVzjsDHtr/cU3A cs/ab29+N8k7RgLFixpiqKO+8/ds1kSfmRY+zwI4+mpsu7Mli4W17V+7huDZG/H+hnLc IEnQ== MIME-Version: 1.0 X-Received: by 10.50.143.104 with SMTP id sd8mr13983046igb.14.1433333165720; Wed, 03 Jun 2015 05:06:05 -0700 (PDT) In-Reply-To: References: <55677AF5.50709@thequod.de> Date: Wed, 3 Jun 2015 14:06:05 +0200 Message-ID: Subject: Re: bracketed paste mode in xterm and urxvt From: Mikael Magnusson To: "Yuri D'Elia" Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Jun 3, 2015 at 12:04 PM, Yuri D'Elia wrote: > On 06/03/2015 10:35 AM, Jesper Nyg=C3=A5rds 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. --=20 Mikael Magnusson