Bug 78237 - stty command does not change key/command bindings in the terminal line settings
stty command does not change key/command bindings in the terminal line settings
Product: Red Hat Linux
Classification: Retired
Component: sh-utils (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2002-11-20 10:13 EST by Need Real Name
Modified: 2007-04-18 12:48 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-03-06 11:53:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2002-11-20 10:13:05 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.18-18.7.x i686; Nav)

Description of problem:
The stty command does not effectively change terminal line settings. An 'stty
erase CHAR' command, for instance, causes the CHAR to appear in an 'stty -a'
listing but the CHAR does not actually perform an erase. This method of changing
key/command bindings appears to have no effect in either tcsh or csh in RedHat
Linux 7.x. In the sh shell, the bindings change to match those displayed in an
'stty -a' listing but only after the shell is re-invoked. So, 'stty erase CHAR'
will not cause CHAR to start erasing the last character typed but executing 'sh'
again after this command will.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Type 'stty -a'. Note the settings (e.g. erase = ^?).
2. Type a command to change a stty setting (e.g. type 'stty erase p').
3. Type 'stty -a' again. Note that the output has changed (e.g. erase = p)
4. Type the new command character. Note that its powers have not been changed by
your stty command. (e.g. 'p' prints a 'p' to the screen; it does not erase)

Actual Results:  The key/command bindings listed by an 'stty -a' did not match
the actual key/command bindings in my shell. 

Expected Results:  If I typed 'stty erase p' as in my example above, causing an
'stty -a' to list p as the erase command key, then the future effect of typing a
'p' should have been to erase the last character typed. 

Additional info:

I also encountered this stty problem in tcsh on a Compaq Alpha running Tru-64
digital Unix. However, on that machine, the problem was not present in csh or
sh. So, this problem may be enhanced by tcsh.
Comment 1 Tim Waugh 2002-12-23 07:07:20 EST
Possibly a readline problem.  For example, if you run 'cat', stty settings are
honoured.  The difference is readline. (But bash might not be hooking into
readline properly..)
Comment 2 Tim Waugh 2002-12-23 07:11:23 EST
Reported upstream.

Note You need to log in before you can comment on or make changes to this bug.