From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3059 invoked by alias); 5 Jun 2015 10:49:55 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35392 Received: (qmail 22342 invoked from network); 5 Jun 2015 10:49:52 -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=0.1 required=5.0 tests=BAYES_00,FSL_HELO_BARE_IP_2, RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.0 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Yuri D'Elia Subject: Re: bracketed paste mode in xterm and urxvt Date: Fri, 05 Jun 2015 12:49:39 +0200 Message-ID: References: <55677AF5.50709@thequod.de> <27004.1433345491@thecus.kiddle.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 193.106.183.18 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 In-Reply-To: <27004.1433345491@thecus.kiddle.eu> On 06/03/2015 05:31 PM, Oliver Kiddle wrote: >> I do agree that mainlining this would make a lot of sense, even as a >> setopt. Or at least provide the keymap/functions needed to enable it. > > I've been using bracketed paste for a while now and would also agree. > The question is in what form to provide it? Note that I posted an > alternative mechanism in workers/29898. The patch below is a port of > that to C. Looks good to me. Actually, with this, couldn't we just disable isig while inserting the characters? If the terminal ensures that the end sequence is filtered in a bracketed paste, the shell can also be sure that anything inbetween is not user input. > With the patch as it stands, which is not meant to be final, users must > still manually enable the mode for their terminal with zle-line-init > etc (I actually append the strings to PS1/PS2/POSTEDIT). It'd certainly > possible to add a setopt option to zsh to automatically output the > enable/disable strings for bracketed paste. Testing a few ancient > terminals (xterm and dtterm on Solaris 10), they seem to have no ill > effect. Perhaps it'd be better to apply some sort of heuristics based on > terminfo, however. Any thoughts on this? I guess we can't use terminfo has no feature for this, right? > What behaviour would you want in vi-mode? What about with the region > active? Replacing the region might make sense but isn't really what > emacs or vim do. emacs disables the transient selection when pasting (which is inserted on the current cursor position). For vi I'm not sure what I would like... maybe the same. You have to enter insert mode normally, so it would make it identical in behavior. Maybe gvim is different?