zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: stty not working
Date: Mon, 01 Sep 2014 11:16:43 +0100	[thread overview]
Message-ID: <20140901111643.6e2acd9b@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <140901012727.ZM1069@torch.brasslantern.com>

Maybe we should be a bit more explicit about what ttyctl does and
doesn't do.  ("tty" seems a bit archaic --- I think it's thirty years
since I've seen anything resembling a teletype --- so I added an
explanation.)  For example:

diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index f709f50..c23b0e4 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -1639,7 +1639,8 @@ Do nothing and return an exit status of 0.
 findex(ttyctl)
 cindex(tty, freezing)
 item(tt(ttyctl) tt(-fu))(
-The tt(-f) option freezes the tty, and tt(-u) unfreezes it.
+The tt(-f) option freezes the tty (i.e. terminal or terminal emulator), and
+tt(-u) unfreezes it.
 When the tty is frozen, no changes made to the tty settings by
 external programs will be honored by the shell, except for changes in the
 size of the screen; the shell will
@@ -1647,6 +1648,14 @@ simply reset the settings to their previous values as soon as each
 command exits or is suspended.  Thus, tt(stty) and similar programs have
 no effect when the tty is frozen.  Without options it reports whether the
 terminal is frozen or not.
+
+Note that, regardless of whether the tty is frozen or not, the
+shell needs to change the settings when the line editor starts, so
+unfreezing the tty does not guarantee settings made on the
+command line are preserved.  Strings of commands run between
+editing the command line will see a consistent tty state.
+See also the shell variable tt(STTY) for a means of initialising
+the tty before running external commands.
 )
 findex(type)
 item(tt(type) [ tt(-wfpams) ] var(name) ...)(


  reply	other threads:[~2014-09-01 10:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01  2:38 Сергей Новиков
2014-09-01  8:27 ` Bart Schaefer
2014-09-01 10:16   ` Peter Stephenson [this message]
2014-09-01 18:28     ` Bart Schaefer
2014-09-02  8:47       ` Peter Stephenson
2014-09-02 13:26       ` Peter Stephenson
2014-09-02 15:52         ` Bart Schaefer
2014-09-02 16:04           ` Peter Stephenson
2014-09-03  1:32             ` Bart Schaefer
2014-09-01 10:02 ` Mikael Magnusson

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=20140901111643.6e2acd9b@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --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).