Monday, March 22, 2010

Using arrow keys in kornshell

Use this tip to enable your arrow keys.
Caveat: You will have to use the emacs bindings

Enjoy!

#!/bin/ksh
# file: enable-arrow
# source in current environment with 
# command:
#       . enable-arrows
#

set -o emacs

# Note: these are the actual control 
# characters. In vi, type i 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     

No comments:

Post a Comment