View previous topic :: View next topic |
Author |
Message |
fIREfox n00b

Joined: 30 Oct 2002 Posts: 12
|
Posted: Tue May 13, 2003 5:39 pm Post subject: Bash end-of-line and beginning-of-line not working |
|
|
Something that was peeing me off for a time was bash's apparent unwanting to move the cursor to the start/end of the line when hitting the home or end keys. It was the same regardless of the user I logged in as and as on the terminal aswell as over ssh.
I finally found the 'problem' to be in the /etc/inputrc script, first make a backup of the default file :
Code: |
mv /etc/inputrc /etc/inputrc-orig
|
then create a new file from a 'basic' layout I found through google :
Code: |
# Begin /etc/inputrc
# Make sure we don't output everything on the 1 line
set horizontal-scroll-mode Off
# Enable 8bit input
set meta-flag On
set input-meta On
# Turns off 8th bit stripping
set convert-meta Off
# Keep the 8th bit for display
set output-meta On
# none, visible or audible
set bell-style none
# All of the following map the escape sequence of the
# value contained inside the 1st argument to the
# readline specific functions
"\eOd": backward-word
"\eOc": forward-word
# for linux console
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert
# for xterm
"\eOH": beginning-of-line
"\eOF": end-of-line
# End /etc/inputrc
|
Finally, re-login and home/end is now happily working. I havent noticed any adverse effects is any other text editors [ I use nano and vim ]  |
|
Back to top |
|
 |
Safrax Guru

Joined: 23 Apr 2002 Posts: 422
|
Posted: Wed May 14, 2003 11:23 am Post subject: |
|
|
I've been looking for a solution to that problem for quite some time now. Thanks for posting this solution! |
|
Back to top |
|
 |
arlequin l33t


Joined: 16 Nov 2002 Posts: 707 Location: grep $USER /etc/passwd | cut -d':' -f6
|
Posted: Wed May 14, 2003 11:28 am Post subject: |
|
|
You can use 'Ctrl + A' and 'Ctrl + E' to move to begin/end of the line.
Thanks for the tips  _________________ J'vous dis ciao !
Au fait, ciao ça veut dire bye en anglais. |
|
Back to top |
|
 |
|