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

Misc. other USEZLE / SHINSTDIN notes

Bash, at least as of (patched for shellshocker) version 3.00, so I guess
this really means GNU readline, will happily read from one tty and write
to another, including prompting and echoing on tty1 what is being typed
on tty2.  This is as easy as redirecting stdin from the second terminal.

Zsh with ZLE enabled forcibly directs all editor interaction including the
prompt to the same tty as the standard input; stdout and stderr including
XTRACE and command output still go to the original tty.  Zsh with ZLE off
behaves like bash except that typed input echoes on the same tty where it
is typed because there's no editor to stty -echo.

Both behave as above regardless of whether stdin is redirected at time of
invocation or with "exec 0</dev/tty2".

This would become important if for some reason the second tty was readable
but not writable by the user running the shell.

Obviously this is all rather unlikely to come up in practice, so I don't
really expect any response here ... just wanted to write it all down so
it is less likely to be forgotten.

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