I prefer
set -o vi
this allow me to use vi to edit the commands I type
just hit escape and use normal vi commands to edit the line
and
<esc-k><k><k><k> to scroll back thru previous 3 commands
<esc-j><j><j> to scroll forward 2 commands
But to answer your question
Code:
#!/bin/ksh
# file: enable-arrows
# source in current environment with
# command:
# . enable-arrows
#
set -o emacs
# Note: these are the actual control
# characters. In vi, type ctrl-v
# then ctrl-P (if u want a ctrl-p)
alias _A=^P
alias _B=^N
alias _D=^B
alias _C=^F
alias __A=^P
alias __B=^N
alias __D=^B
alias __C=^F