No, this is not true.
$HISTFILE is a filename, then the session history will be stored in that file. This is explained in the manual. The number of commands remembered in the shell history is limited by the value of
I believe that the history is flushed to the file after the execution of each command, as opposed to
bash that flushes the history to file when the shell session ends. This may depend on which implementation of
ksh you are using.
HISTFILE to a filename in your
~/.profile file (which is read by login shells), or in the file pointed to by
$ENV (which is read by interactive shells and has the default value of
$HISTSIZE is by default 500 or 512 or something thereabouts depending on the implementation of
ksh you are using. Neither of these variables need to be exported. The history file does not need to exist before doing this.
In comments you mention that some Emacs movement and command line editing keys do not work. This is because the shell is not in Emacs editing mode. Either set the variable
emacs or use
set -o emacs to enable Emacs command line editing mode. This is also explained in the manual. These variable also do not need to be exported unless you want other programs than the shell to use them.
set -o emacs
This has been thoroughly tested on OpenBSD with both
pdksh (which is
ksh on OpenBSD). I don't use
mksh, but since it's a
pdksh derivative, I believe this would work with that shell too.
bash) can not share history file as they have different history formats.
This is usually not a problem if you have separated initialization files for
export ENV="$HOME/.kshrc" in
.profile). You may further distinguish various
ksh implementations by looking at