zsh-users
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Elliott Cable <me@ell.io>
Cc: zsh-users@zsh.org
Subject: Re: edit-command-line, vim, and pasting
Date: Fri, 11 Dec 2015 06:33:37 +0100	[thread overview]
Message-ID: <19792.1449812017@thecus.kiddle.eu> (raw)
In-Reply-To: <CAPZ477Po7dLpPZMUiQ6b==D8rw0ab+UVfaOEnGK8jadzHxZ=cw@mail.gmail.com>

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


      parent reply	other threads:[~2015-12-11  5:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-01 16:37 Elliott Cable
2015-11-01 18:39 ` Bart Schaefer
2015-11-02 11:16   ` Oliver Kiddle
2015-12-07  3:01     ` Elliott Cable
2015-12-07  6:38       ` Bart Schaefer
2015-12-11  5:33       ` Oliver Kiddle [this message]

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=19792.1449812017@thecus.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=me@ell.io \
    --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).