Bug 30884

Summary: bash attempts to bind termcap 'kH' to end-of-line, misses xterm End key
Product: [Retired] Red Hat Linux Reporter: Bill Crawford <billc>
Component: readlineAssignee: Preston Brown <pbrown>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-03-07 23:41:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bill Crawford 2001-03-07 00:18:30 UTC
readline uses the termcap interface by default.

It attempts to bind the termcap capabilities 'kh' and 'kH' to
beginning-of-line and end-of-line functions in readline.  However for
xterm, the End key is defined in terminfo.src (in the ncurses package) as
'kend' => termcap '@7' ...

There are two possible fixes for this: change the terminfo.src file to use
'kll' instead of 'kend' or hack readline to check for the '@7' capability
as well.

Changing the terminfo source isn't really an option as bash and other
readline-based CLIs would still not work correctly on other platforms (I
use Solaris a lot, too).

Since this fails to work correctly on other platforms (specifically, bash
doesn't correctly bind end-of-line on Solaris 6 through 8 either) I would
like to see a fix for this that could be fed back to the readline
maintainers.  I'll do that myself if I have to, but a fix in RH7.1 would at
least get rid of the current /etc/inputrc bandaid.

Comment 1 Bill Crawford 2001-03-07 23:41:33 UTC
I apologise for the confusing subject line.  The problem originally arose in
relation to bash, but I traced it to a "feature" of the readline library.  In
fact it's more of a historical misunderstanding.


Comment 2 Preston Brown 2001-03-09 04:58:03 UTC
agreed that readline should be fixed.  kH is entirely wrong.

fixed in -8 and later.

Comment 3 Preston Brown 2001-03-09 04:59:24 UTC
one more comment: most likely we never noticed this because the default
/etc/inputrc we ship takes care of all these things, and it masks the
compiled-in behaviour.

Comment 4 Bill Crawford 2001-03-09 10:00:35 UTC
Yes, it used to be masked.  I've noticed for the last year plus that it doesn't
work right on "the other Un*x" :)
Much appreciated.

Although ... the xterm terminfo doesn't work right with Solaris xterm ...