Markus Teich dixit:
>I am using mksh for nearly a year now, but only recently I noticed some weird
>behaviour with the history file. When I have multiple pts open and enter a
>Command in one of them, it can't be found in the history of the others.
It can, if you press Enter in the other shell.
>Also often the whole „local“ history of a pts gets lost when exiting
>that pts with Ctrl-D.
>
>In my .mkshrc I have:
>export HISTFILE=$HOME/.mksh_history
>export HISTSIZE=4200
If you have about 4198 entries, this behaviour will indeed exist.
The only solutions here are to either raise HISTSIZE or truncate
the history file to something smaller yourself (e.g. using the
「fc -l」 and 「print -s」 commands).
This is parallel processing and unstable. I do not believe in
persistent history, nor its current implementation, and have
only retained it in mksh because it’s a really popular feature,
but will continue to discourage using it (e.g. for privacy and
data retention reasons, asides from code issues), even though
I fixed the worst bugs.
>Is there a reason for using a binary format for the history instead of
>a simple textfile where each command is appended?
Faster access, line numbers, and compatibility to earlier
versions of mksh/mirbsdksh/oksh/pdksh.
bye,
//mirabilos
PS: Can we bounce this to the mailing list? If you respond
in positive I’ll do that. I believe this is of worth to
most readers.
--
„Also irgendwie hast du IMMER recht. Hier zuckelte gerade ein Triebwagen mit
der Aufschrift "Ostdeutsche Eisenbahn" durch Wuppertal. Ich glaubs machmal
nicht…“ -- Natureshadow, per SMS
„Hilf mir mal grad beim Denken“ -- Natureshadow, IRL, 2x