End & Home keys for Bash on FreeBSD
How do I configure the keyboard on a terminal session?
I connect to a new FreeBSD box via OpenSSH (in PuTTY). My shell is BASH. The Delete, End and Home keys just type a tilde ("~") instead of doing what I expect. How do I change this to make the End key jump to the end of the command line, the Home key jump to the beginning and the Delete key delete the currently highlighted character on the command line. Software: FreeBSD 5.3-RELEASE (i386 on a Pentium II) PuTTY Release 0.53b / OpenSSH 3.8.1pl GNU Bash 2.05b.0(1)-release |
Here is my ~/.inputrc (create this file in your home dir); only works if your shell is BASH and add following two line :
Code:
"\e[1~": beginning-of-line |
Sorry i forgot to add delete key code:
Code:
"\e[3~": delete-char |
Thanks Vivek / Nixcraft. That works perfectly. :) Cheers, Mark.
|
BTW ctl + a and ctl + e should work perfectly. I find them easier to use since I don't have to take my fingers off the home row.
|
All times are GMT -5. The time now is 12:39 AM. |