On Mon, Jan 07, 2013 at 02:09:01PM +0100, Lars von den Driesch wrote:
> Hello,
> 
> I just discovered a strange behaviour with ksh-history that I cannot
> explain. So I hope you can probably help. I read some man pages and
> used google but didn't find anything useful. If this is is just a RTFM
> please hit me with it :-)
> 

ready ? :-)

> [...]
> 
> However, I like vim and as soon as I set the EDITOR env variable to it
> the "arrow up/down" functionality is gone. In fact even if EDITOR is
> set with "export EDITOR=" the functionality is gone. Commands typed in
> still appear in the history using "fc -l". I just cannot use the
> arrow-keys.
> 

It is the documented behaviour in ksh(1) :-) 

You could see the EDITOR variable comment in ksh(1):

EDITOR
   If the VISUAL parameter is not set, this parameter controls
   the command-line editing mode for interactive shells.

And as arrow-keys are not used by the 'vi'-like command-line editing...

> What am I missing here? Can someone confirm this?

You need to set your command-line editing mode to "emacs".

In order to keep EDITOR to vi, you should set VISUAL to "emacs" in your 
.profile:

VISUAL=emacs
EDITOR=vi
export VISUAL EDITOR
-- 
Sebastien Marie

Reply via email to