FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!

Arrow keys for ksh




If you are using ksh on your unix box, you can make arrow keys and home key work for command line recall and navigate through command line text. Just add these lines in your .profile file at the end.

Code:

[[ -o interactive ]] || return 0

set -o emacs

alias __A=$(print '\0020')    # ^P = up    = previous command
alias __B=$(print '\0016')    # ^N = down  = next command
alias __C=$(print '\0006')    # ^F = right = forward a character
alias __D=$(print '\0002')    # ^B = left  = back a character
alias __H=$(print '\0001')    # ^A = home  = beginning of line





0 blog comments below




FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.