zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
Cc: zsh-workers@zsh.org
Subject: Re: edit-command-line, vim, and pasting
Date: Thu, 05 Nov 2015 12:09:03 +0100	[thread overview]
Message-ID: <29492.1446721743@thecus.kiddle.eu> (raw)
In-Reply-To: <151103093149.ZM18895@torch.brasslantern.com>

Bart wrote:
> Ideally there'd be some mechanism ala the STTY parameter / ttyctl that
> resets this state every time an external command gets control of the
> terminal.

It needs to send both an end sequence before the external command
gets control and a start sequence once that external command has
finished. I don't think it'd be great to spew out the sequences every
time an external command is run. That could add up to quite a few escape
sequences being generated for completion - and to no real purpose.
I'm not aware of any signals or other mechanisms to detect commands
reading from the terminal after they've been executed and even if there
was, it wouldn't actually help for many reasons.

edit-command-line already does this:
  exec </dev/tty
I'm not quite sure why stdin (but not stdout/stderr) is closed for zle
widgets but we could generate sequences only for commands executed with
the tty opened on fd 0. However, it is easier to just handle the case
specifically in edit-command-line.

Oliver


  reply	other threads:[~2015-11-05 11:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAPZ477Oz5BCB797hpE5SO+X9f_Sz8BXX49nUZ9jPERgVGcXHzw@mail.gmail.com>
     [not found] ` <151101103921.ZM16163@torch.brasslantern.com>
     [not found]   ` <18028.1446462993@thecus.kiddle.eu>
2015-11-03 17:31     ` Bart Schaefer
2015-11-05 11:09       ` Oliver Kiddle [this message]
2015-11-05 17:22         ` Bart Schaefer

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=29492.1446721743@thecus.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@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).