Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .