Hi Max,

My english is sometimes not so clear :-)

Ofcourse command history is running by default.Everything was Ok.
Then I read some FAQ and man and some programs need $EDITOR set.
So I use vi for it,which is my preferred editor.Then I lost functions
for command history.I was looking what can be wrong and undo some
changes in .profile.$EDITOR was it.

I thought,that 'export EDITOR=/usr/bin/vi' is enough -> my fault.

I don't read whole ksh man page yet (don't beat me please:-)).
Maybe it's good time,but there is so much reading for me now about
whole system.Maybe I just read too quick and missed important info
about 'set -o emacs'.

Vi is very good for many purposes.I like it's style and philosophy.
My first touch was in Mandriva Linux 8.1 5 years ago.I was using it
on desktop without looking deeply in to.Couple months ago I discovered
OpenBSD and don't know why I was started with Linux :-) This a great
OS and project,can't find real alternative for it.Lots of reading
for newbies like me,but for me it's not a problem.Only when I read
quick :-D

Thx a lot for your help

TB

-----Original Message-----
Hi Tomas,

I don't quite understand what you're asking. Do you want command
history in your ksh ? If you do, you don't have to change anything
(HISTSIZE should be 500 by default). If you don't, export HISTSIZE=1.
If you want persistent history over different login sessions, export
HISTFILE=~/.ksh-history.

I understood your question to mean that you want history and you want
to use the arrow keys to navigate through your history. If you export
EDITOR=vi, you must set -o emacs for this to work. Alternatively, you
can export EDITOR=emacs or learn to use vi-style commandline editing.

Again, please read the manual page for the different environment
variables. Also read the sections on 'Emacs editing mode' and 'Vi
editing mode'. They explain this in quite a bit of detail.

Personally, I've been using vi-style commandline editing for many,
many moons now and I like it very much. Since you export EDITOR=vi
(indicating that you know vi and want to use it), you may want to give
this a try to see if you like it too.

Cheers,

Paul 'WEiRD' de Weerd

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

Reply via email to