Opened 17 years ago

Closed 17 years ago

#1540 closed bug (fixed)

Home/End keys do not work in shell

Reported by: hauser Owned by: jackburton
Priority: normal Milestone: R1/alpha1
Component: Applications/Terminal Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: x86

Description

Home and End keys are very useful in shell

Attachments (1)

shell-keys.diff (1.3 KB ) - added by axeld 17 years ago.
Fix for the bash defaults

Download all attachments as: .zip

Change History (10)

comment:1 by hauser, 17 years ago

Type: bugenhancement

comment:2 by axeld, 17 years ago

Component: - User Interface- Applications/Terminal
Milestone: R1R1/alpha
Owner: changed from stippi to jackburton
Type: enhancementbug

comment:3 by jackburton, 17 years ago

Looks like TermView forwards those key to bash, so it's bash which doesnt' handle them. A very quick search on the internet resulted in this:

in /etc/inputrc: # allow the use of the Home/End keys # "\e[1~": beginning-of-line # "\e[4~": end-of-line Uncomment the two lines and all is well.

comment:4 by bonefish, 17 years ago

That's also in my .inputrc under BeOS. Together with:

DEL: delete-char
Control-f kill-word

I suppose we should just add an inputrc to the image. Unless someone has a better idea, of course.

comment:5 by axeld, 17 years ago

Well, I think the preferred solution would be to have those in the defaults; preferrably hard-coded, but a settings file would do, too.

comment:6 by axeld, 17 years ago

Stefano, would you mind if I look into it?

comment:7 by axeld, 17 years ago

I've attached a diff that would fix it within bash. Should I apply it?

by axeld, 17 years ago

Attachment: shell-keys.diff added

Fix for the bash defaults

in reply to:  6 comment:8 by jackburton, 17 years ago

Replying to axeld:

Stefano, would you mind if I look into it?

Please do. But IMHO it would be better if we didn't touch bash code, and just put add an inputrc file to the image.

comment:9 by axeld, 17 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev22488. Having an inputrc file would benefit other apps, too, but good defaults make even more sense to me (I wouldn't mind having both, though).

Note: See TracTickets for help on using tickets.