From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10578 invoked by alias); 11 Dec 2015 05:42:44 -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: 21078 Received: (qmail 1631 invoked from network); 11 Dec 2015 05:42:43 -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.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MALFORMED_FREEMAIL,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1449812190; bh=PBPEcOfIcHl/bGIuj8s0u660lbSouhH8maf5DLX09zc=; h=cc:In-reply-to:From:References:To:Subject:Date:From:Subject; b=idV8U1LVCVUN62UxMDCqiFH22CojekNOA50hRJQbdDaafaj0u1qHNyEkhIe36/+DiTYx29VclTtjH9bvYadMT2b9Xel7+osZFaz7GPp15pqJZGsb277THAM1goXAnpUA15gM7BCArHYDwf4WMG2zZ9g7UJS8iayvKQtcE92V8Tg8cQu19T2kLuGKwOV8OKexeC5ynCgoo2DG+GKeY0+ce8L3EyUuCmngbuG5u2M1VJ81n5k3eOJ9IvvvqlmqZMkcVLHUWceKqIetqf/t8GGSY4xzUaFmddG1e2QuJJRf++sUAoYQ/LLSyN5NNrQ/uKhkr7BbKMIlzl02YqHl+YhcKQ== X-Yahoo-Newman-Id: 680156.69387.bm@smtp112.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-4 X-YMail-OSG: afiRptsVM1lPK_s.unnP8vTZmBLpdIZZD7phN8r70ViRwx8 o.bSWIBmlcJEnvuuSWhKAEnCMFV4ujQ4DmnBdtXxcagsL4VACbZMDAIWC1rx 9iVJPZLJTWh2SfBwXQstjRk86WZKvi7BsvQiZshYvmoVgaYlH37.VK8po3sl 0eJx7CTTVlHQxSyENaPOL5O_VqabWSeJ6jcRPZHhyxTn6aNlITeXzsM8natC jeeitcrAkyNjdb8WHngIEmuRaZJSObB70F55oGHaMsuIXxCJHKYBwM4c8IoR J_sNNGoQtwoSUDKzGwm.rlR.PHM4L6.Y_N0HmC0fr6EL0BX6wMvUfx0HuoZo V14F1na9fzwQGz_5MlO.7_fI2WKN.tUgGKL7Om7.4c84X_0h8p67FkdfD.2e FG4neFdCKSB8iSKj8gSwGnLw_9SPye5grTo6flfE0y6MNcdnpzeEaIAKf2xp t8nEauWcxrU7GMFvpfmJkSAy0owaicZFBvJshL1YmdbgIOG5JeiqGYZ.zeTm yDbS78y8pOpIF0DnXJbR3xaYIJ81kYJdg9L3PotVxqoqI X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- cc: zsh-users@zsh.org In-reply-to: From: Oliver Kiddle References: <151101103921.ZM16163@torch.brasslantern.com> <18028.1446462993@thecus.kiddle.eu> To: Elliott Cable Subject: Re: edit-command-line, vim, and pasting MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19791.1449812017.1@thecus.kiddle.eu> Date: Fri, 11 Dec 2015 06:33:37 +0100 Message-ID: <19792.1449812017@thecus.kiddle.eu> On 6 Dec, Elliott Cable wrote: > > I'm not sure we can do anything more generalized than the following > > patch to edit-command-line. Perhaps the zle builtin could have an option > > to cover the situation but that doesn't help much because the function > > would still need to invoke the builtin. What did you have in mind? > > Hm. How can I get your fix included into mainline? I don't want to try > and maintain local changes on each of my machines, but > `edit-command-line` is excellent, and I really want to be able to use > it reliably! I've now committed it. Sorry, the issue wasn't really finalised because the question of a more generalised solution was hanging over it and I don't have much enthusiasm (or time just now) for that; nor am I convinced that it's a good idea: A zle builtin flag hides what it is going on which might lead someone to toggle bracketed paste on and off several times. That doesn't interact well with typeahead. I'm also reluctant because I'm not clear on why stdin is closed. The documentation states that it prevents external commands from unintentionally blocking ZLE but then why is edit-command-line reopening it not a problem? By the way, if we want to add a reference to the documentation, it should come there (under "User-defined Widgets"). I barely dare mention this but the few functions that use read -k arguably suffer the same problem. With regard to Yuri's suggestion that we should push for xterm/urxvt to do base64 for security reasons, if I was going to reinvent the xterm feature, I'd ditch the end sequence and put the length in the start sequence. That makes typeahead handling easier if the output is split across separate processes (or parts of a single process). Fundamentally the security issue is that web browsers allow a seemingly innocuous selection that is something else. Oliver