Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using xterm on korn shell. I have defined in .kshrc as follows:

set -o emacs

alias __A=`echo "\020"`     # up arrow = ^p = back a command

alias __B=`echo "\016"`     # down arrow = ^n = down a command

alias __C=`echo "\006"`     # right arrow = ^f = forward a character

alias __D=`echo "\002"`     # left arrow = ^b = back a character

alias __H=`echo "\001"`     # home = ^a = start of line

alias __Y=`echo "\005"`     # end = ^e = end of line

I do a source ./.kshrc (in my home), but the up key press is doing nothing. Same action in bash displays older executed commands.

Also, in korn shell, history command dont show history (when in xterm), shows following msg - /bin/ksh: hist: 1-0: invalid range.

share|improve this question

1 Answer 1

If the emacs bindings do not work, use the vi bindings instead. Replace set -o emacs with set -o vi in your .kshrc, then add the following to your .vimrc file:

set cpo-=<
nmap k <Up>
nmap j <Down>
nmap h <Left>
nmap l <Right>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.