Bug 78237 - stty command does not change key/command bindings in the terminal line settings
Summary: stty command does not change key/command bindings in the terminal line settings
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sh-utils
Version: 7.3
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2002-11-20 15:13 UTC by Need Real Name
Modified: 2007-04-18 16:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-03-06 16:53:04 UTC

Attachments (Terms of Use)

Description Need Real Name 2002-11-20 15:13:05 UTC
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 12:07:20 UTC
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 12:11:23 UTC
Reported upstream.

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