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

Dr. Werner Fink werner at suse.de
Fri Jul 14 08:49:55 UTC 2023


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.

Hmmm ... if one shrinks the history size of the current shell?

> 
> I have not yet tried the patch, but I will when I have some time.

Here it simply works ... it is a port of a very old patch I had in past
which had not worked anymore with recent tcsh versions (and I thought
that the problem was fixed because of that:)

 Tue Oct 15 17:05:54 UTC 2013 - werner at suse.de
 - Add patch tcsh-6.18.01-history-merge.dif which is a backport of
   the patch from Stanislav Tokos (bnc#844752)

 Fri Nov 20 11:48:50 UTC 2020 - Dr. Werner Fink <werner at suse.de>
 - Update to tcsh bug fix version V6.22.03 - 20201118
   * Fix $x:q:h and $x:q:t to not crash (alzwded) with strings containing /
   * Block SIGHUP while writing history/directory stack (Brett Frankenberger)
   * Fixed reversed test that broke history merging (Brett Frankenberger)
   * Prevent recursive entry for writing history (Brett Frankenberger)
   * alxwded at github, keep track of the :g and :a modifiers per modifier they
     affect.
   * alzwded at github, fix infinite loop with :gas variable modifier
   * PR/88: Add a Q: modifier that preserves empty arguments leaving :q
     alone.
 - Port the patches to V6.22.03
   * tcsh-6.15.00-pipe.dif
   * tcsh-6.17.06-dspmbyte.dif
   * tcsh-6.18.03-catalogs.dif
   * tcsh-6.22.02-local-dotlock.dif
 - Remove patches now upstream
   * tcsh-6.22.02-double_tilde.dif
   * tcsh-6.22.02-history-merge.dif
   * tcsh-6.22.02-workaround-common.patch
 - Make test suite work

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: signature.asc
Type: application/pgp-signature
Size: 894 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/tcsh/attachments/20230714/a6a5c145/attachment.asc>


More information about the Tcsh mailing list