1

I connect to AIX 5.3 through ssh from Centos 6. Shells on AIX and Centos are bash. When I press "Home", "End", "PgUp", "PgDn" in shell, bash outputs tilde (~) and cursor is not moving to end or begin of string. How can I get these buttons work properly?

sendmoreinfo
  • 582
  • 6
  • 22
Alexandr
  • 13
  • 2

1 Answers1

2

Try putting this in your Readline initialization file (default ~/.inputrc):

"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[7~": beginning-of-line
"\e[8~": end-of-line

If you want to figure out what characters are being generated by a key sequence, one way is to use od -c, type the key sequence, then Enter, then Ctrl+D. Doing this for Home looks like this for me:

$ od -c

0000000 033   [   7   ~  \n
0000005
Michael Hoffman
  • 32,526
  • 7
  • 64
  • 86
  • Thank you for inputrc. It helps. I put to this file lines: "\e[1~": beginning-of-line "\e[4~": end-of-line "\e[5~": beginning-of-history "\e[6~": end-of-history "\e[7~": beginning-of-line "\e[8~": end-of-line – Alexandr Apr 12 '13 at 08:04