As I read deeper now I found this :

  Note: traditionally, EDITOR was used to specify the name of an
                (old-style) line editor, such as ed(1), and VISUAL was used
to
                specify a (new-style) screen editor, such as vi(1).  Hence if
                VISUAL is set, it overrides EDITOR.

I don't have VISUAL set and EDITOR was used for line editor.Maybe this?
Screen editor set in variable for line editor? - don't know how it's set
internal.


-----Original Message-----
From: Paul de Weerd [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2008 10:23 AM
To: Tomas Bodzar
Cc: misc@openbsd.org
Subject: Re: command history in ksh missed when I set $EDITOR

On Wed, Jun 11, 2008 at 08:57:22AM +0100, Tomas Bodzar wrote:
| Hi all,
|
| When I set this in my .profile
|
| # Editor
| EDITOR=/usr/bin/vi
| export EDITOR
|
| then I don't have command history,I can't use arrow keys for going to
previous
| command,
| CTRL+R is not running too.
|
| What's wrong with this setting?I'm using ksh

You'll have to `export VISUAL=emacs` or `set -o emacs` to use arrow
keys for command history. Alternatively, you can do what you've
configured your system to do and use <esc>-[jk] to navigate through
your command history and use vi-like keys to edit your command line.

Things are working as expected (it's just that you weren't expecting
this ;), read the ksh manpage, specifically the section on VISUAL and
EDITOR. Note that you can have VISUAL and EDITOR set to vi and still
be able to use emacs mode on your shell by using set -o emacs.

Cheers,

Paul 'WEiRD' de Weerd

--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/

Reply via email to