
MT>prompt `%@exec[readhist]$h$e[s$e[1;1f$e[1;37;41m$e[K Level=$z    %@dosmem[b]
MT> $D     Time: $t$h$h$h$e[1;%@eval[%_columns-%@len[%_cwd]-6]fPath:
MT>$p$e[u$e[0;1;33;44m$n$g$e[0;37;44m`

MT>Thanks to your tip I now have a complete history list, including those
MT>commands typed while shelled out, but do you have any ideas why the "0" is
MT>being returned?

I too went through the same learning loop you refer to, also getting the
unwanted 0, and reaching the same solution you did. But then I went further,
deciding to sort any old history file, and remove duplicate commands, then
append the current session's history to the end of the previous history. here
it is (on one line, of course):

ALIAS:  readhist=iff exist k:\histfile then
        ^ sort<k:\histfile>k:\histfile
        ^ history>>k:\histfile
        ^ d:\4dos\compact k:\histfile>nul
        ^ history/f
        ^ history/r k:\histfile
        ^ del k:\histsave>&nul
        ^ ren k:\histfile histsave/q
        ^ endiff

PROMPT: prompt %%@exec[readhist]~b.[1;33m$p.[0;36m$g

DOS COMMANDS CARRIED OUT ONCE AT START OF EACH SESSION
        if exist k:\histfile erase k:\histsave>&nul
        if exist k:\histsave rename k:\histsave histfile /q

The RENAME HISTFILE HISTSAVE in the alias READHIST is done so that, if I have
to bounce out of the current session with Ctrl-Alt-Del (using Desqview),
I haven't lost all my previous history (K: is a RAM drive).
Although this looks like a lot of processing, I really don't notice it (on a
486/25).

