Bug 30799 - bash2.x recognises "Home" key but not "End" key
bash2.x recognises "Home" key but not "End" key
Product: Red Hat Raw Hide
Classification: Retired
Component: setup (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-03-06 06:22 EST by Bill Crawford
Modified: 2014-03-16 22:19 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-03-06 18:58:08 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 Bill Crawford 2001-03-06 06:22:57 EST
I believe this is actually a "feature" of bash 2.x, because version 1
always worked.  I've really noticed this since doing a fresh wolverine
install yesterday, so please let me know if I need to file it against
"public beta" instead.

Anyway, I used to be able to hit the "Home" key to go to the beginning of
the line, and "End" to, yes, go to the end of the line.  With the new
version, suddenly instead of going to the end of the line, I see a '~'
inserted in the command line.

I've seen this problem on other systems (Solaris) at work where we've built
bash from source, so I believe bash just isn't binding the key (^E works,
but I've so far failed to find a key binding command that works for the
"End" key).

If you happen to know of a way to fix this, please do :)
Comment 1 Bernhard Rosenkraenzer 2001-03-06 07:37:22 EST
This works for me in text mode and in konsole...
It's broken in rxvt. Reassigning.

Comment 2 Harald Hoyer 2001-03-06 08:05:01 EST
bug is in /etc/inputrc ...
Comment 3 Bernhard Rosenkraenzer 2001-03-06 08:07:57 EST
/etc/inputrc is in setup... reassigning.
"\e[8~": end-of-line
fixes rxvt)

Comment 4 Bill Crawford 2001-03-06 08:08:45 EST
The real bug is in bash not picking this up from terminfo data ... but thanks
for fixing this for RH.  I'll have to figure out the bash problem myself (this
happens on Solaris too, and they don't appear to have an "inputrc" file at all).
Comment 5 Bill Nottingham 2001-03-06 11:37:36 EST
No, bash works fine here running with TERM set to 'rxvt' in a different
terminal, so I don't think it's a bash/terminfo problem, unless the
terminfo for rxvt is wrong.

In any case, will be added in setup-2.4.5-1.
Comment 6 Bill Crawford 2001-03-06 12:19:02 EST
Um, it doesn't work with these:

[root@fraser SPECS]# rpm -q setup bash $( rpm -qf $( which xterm ) )

If I set TERM to rxvt, then neither Home nor End work as expected.  In xterm,
only Home works.  It is the same on Solaris machines at work, so I believe this
is a bash bug, rather than RH-specific.  I'll try to look into it further,
perhaps I need to file a report with the bash developers/maintainers.

Oddly, though, it worked up to 7.0, and continued to work after a number of rpm
-F runs over Raw Hide.  I did a fresh Wolverine install and it's stopped working
(although mostly things have improved :)
Comment 7 Bill Nottingham 2001-03-06 12:29:09 EST
I believe you need the setup package currently in rawhide for
it to work normally on xterms.
Comment 8 Bill Crawford 2001-03-06 12:50:54 EST
I'm downloading the Raw Hide snapshot from a mirror as I type, but I'm concerned
that bash seems to be able to pick up the "Home" key from terminfo but not the
"End" key ... bash 1.x worked OK.
In fact this looks like a readline library issue.
Comment 9 Bill Crawford 2001-03-06 18:54:45 EST
I found the real cause of the problem (which /etc/inputrc is just working round)

bash uses the termcap interface by default, and also it tries to bind the 'kh'
and 'kH'capabilities to beginning-of-line and end-of-line respectively.
Unfortunately the xterm entry in terminfo.src defines 'kend' (termcap '@7')
rather than 'kll' (termcap 'kH') so bash doesn't correctly bind the End key to

A real solution would probably involve changing either the terminfo source, or
hacking bash to look for the kend/@7 capability as well as or instead of the
kll/kH capability.

Is it worth me filing this updated report against ncurses or bash?
Comment 10 Bill Nottingham 2001-03-06 18:58:04 EST

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