Opened 12 years ago

Closed 12 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:
Has a Patch: no Platform: x86

Description

Home and End keys are very useful in shell

Attachments (1)

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

Download all attachments as: .zip

Change History (10)

comment:1 Changed 12 years ago by hauser

Type: bugenhancement

comment:2 Changed 12 years ago by axeld

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

comment:3 Changed 12 years ago by jackburton

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 Changed 12 years ago by bonefish

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 Changed 12 years ago by axeld

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 Changed 12 years ago by axeld

Stefano, would you mind if I look into it?

comment:7 Changed 12 years ago by axeld

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

Changed 12 years ago by axeld

Attachment: shell-keys.diff added

Fix for the bash defaults

comment:8 in reply to:  6 Changed 12 years ago by jackburton

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 Changed 12 years ago by axeld

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.