Bug 30799 - bash2.x recognises "Home" key but not "End" key
Summary: bash2.x recognises "Home" key but not "End" key
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: setup
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-03-06 11:22 UTC by Bill Crawford
Modified: 2014-03-17 02:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-03-06 23:58:08 UTC
Embargoed:


Attachments (Terms of Use)

Description Bill Crawford 2001-03-06 11:22:57 UTC
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 12:37:22 UTC
This works for me in text mode and in konsole...
It's broken in rxvt. Reassigning.



Comment 2 Harald Hoyer 2001-03-06 13:05:01 UTC
bug is in /etc/inputrc ...

Comment 3 Bernhard Rosenkraenzer 2001-03-06 13:07:57 UTC
/etc/inputrc is in setup... reassigning.
(adding
"\e[8~": end-of-line
fixes rxvt)



Comment 4 Bill Crawford 2001-03-06 13:08:45 UTC
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 16:37:36 UTC
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 17:19:02 UTC
Um, it doesn't work with these:

[root@fraser SPECS]# rpm -q setup bash $( rpm -qf $( which xterm ) )
setup-2.4.1-1
bash-2.04-17
XFree86-4.0.2-9

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 17:29:09 UTC
I believe you need the setup package currently in rawhide for
it to work normally on xterms.

Comment 8 Bill Crawford 2001-03-06 17:50:54 UTC
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 23:54:45 UTC
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
end-of-line.

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 23:58:04 UTC
Probably.


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