Thorsten Glaser wrote: > 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.
Unfortunately it did not work for me. I opened a new instance of st running mksh and entered „echo hi there“, then opened another new instance of st running mksh and I could not get the command from the history. Not by pressing the up-arrow, nor by invoking the „I-search“ with ctrl-r. Also this did not change after pressing return in both shells. I am using mksh 48b from the gentoo tree on a x86_64 3.12.7 kernel. > >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. Will the shared history work, even if I disable the persistent history? I would rather use a working shared history with no persistence than a persistent one that behaves unexpectedly. :( > >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. Could it be the case, that my history file is broken, because I think I removed some commands just be removing the string and the control characters around it, which I assumed to corellate to this entry? > 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. Yes, we can. Kind regards, Markus
