Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: edit-command-line, vim, and pasting



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



Messages sorted by: Reverse Date, Date, Thread, Author