[Tcsh] How is merge in savehist supposed to work?

Dr. Werner Fink werner at suse.de
Mon Jul 24 08:16:46 UTC 2023


On 2023/07/19 13:06:41 +0200, Dr. Werner Fink wrote:
> On 2023/07/14 09:32:43 +0300, Kimmo Suominen wrote:
> > This is how the manual page documents the merge setting:
> > 
> >     If the second word of savehist is set to ‘merge’, the history
> >     list is merged with the existing history file instead of replacing
> >     it (if there is one) and sorted by time stamp.
> > 
> > I'm not sure sethistory() is the correct place to fix this: the merge
> > option should impact saving the history. It should not impact loading the
> > history, and it should not discard history entries when the size of the
> > history is changed.
> > 
> > I have not yet tried the patch, but I will when I have some time.
> 
> Just to be curious ... do you have a result?  I've a customer which is
> waiting for a working tcsh with merge in history enabled.

Meanwhile the main reason seems to be the fastMergeErase which in
case of history merge does not work well ... attached a patch which
simple disables fastMergeErase for history merge.

Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tcsh-6.24.10-history-merge.dif
Type: text/x-patch
Size: 2107 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/tcsh/attachments/20230724/a2a98d7b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 894 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/tcsh/attachments/20230724/a2a98d7b/attachment.asc>


More information about the Tcsh mailing list