NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: set -o emacs ; stty -echo
Date: Tue, 19 Jul 2022 21:34:27 -0400
From: Andrew Cagney <andrew.cagney%gmail.com@localhost>
Message-ID: <CAJeAr6uPi8DV4LQY4bjZnFteqbKZtKmZDqWT2C1kLDBd6p8wig%mail.gmail.com@localhost>
| should, like for bash, this put the terminal into -echo mode?
|
| arm64$ echo $SHELL
| /bin/sh
| arm64$ set -o emacs ; stty -echo
| arm64$ pwd
| /home/cagney
|
| other combinations are equally puzzling. for instance:
|
| set -o emacs ; stty -echo ; set +o emacs
| doesn't flip to -echo mode either
Sorry this has taken so long for (my part of) looking into this.
I am now confident that sh has nothing to do with this at all, in
fact, sh never makes any changes (by itself) to any of the terminal
operating modes -- it will check to see if the line discipline happens
to be the old one (which I don't think exists on NetBSD any more, and
probably not anywhere else relevant either) but if it is, all it does is
refuse to enable job control, it doesn't even attempt to alter it.
Aside from that, the only tty/sh interactions are to change the terminal's
process group as needed as the foreground job alters, turn off O_NONBLOCK
if someone stupidly set it on the shell's input stream (whether a terminal
or otherwise) and monitor the window width of stdout (if a tty) for some
output to be able to be wrapped better.
Everything else related to tty modes is handled entirely by libedit.
Hence, I am passing this to Christos to look at.
kre
Home |
Main Index |
Thread Index |
Old Index