Add `lock' to savehist and use {pre,post}cmd instead of just precmd - dotfiles - leot's dotfiles
 (HTM) hg clone https://bitbucket.org/iamleot/dotfiles
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) changeset 09dc809c41bce8ffef5154d1942ded39cea95cb9
 (DIR) parent ce44bc298f0c5a7c7da066fe6ed1e96f10689a72
 (HTM) Author: Leonardo Taccari <iamleot@gmail.com>
       Date:   Sun, 30 Sep 2018 22:55:06 
       
       Add `lock' to savehist and use {pre,post}cmd instead of just precmd
       
       Both changes seems to avoid possible history "corruption" leading to empty
       entries (e.g. several `#+...' lines one after the other).
       
       Diffstat:
        tcshrc |  5 +++--
        1 files changed, 3 insertions(+), 2 deletions(-)
       ---
       diff -r ce44bc298f0c -r 09dc809c41bc tcshrc
       --- a/tcshrc    Sun Sep 30 10:19:31 2018 +0200
       +++ b/tcshrc    Sun Sep 30 22:55:06 2018 +0200
       @@ -26,7 +26,7 @@
        set prompt2 = "... "
        set promptchars = %#
        set rprompt = "%U%c3%u"
       -set savehist = (1000000 merge)
       +set savehist = (1000000 merge lock)
        set vimoveback # XXX: experimental!
        
        alias helpcommand '( man -h \!:1 > /dev/tty ) >& /dev/null'
       @@ -92,7 +92,8 @@
        setenv PASSWORD_STORE_X_SELECTION "primary"
        
        # special aliases
       -alias precmd "history -S; history -M"
       +alias precmd "history -M"
       +alias postcmd "history -S"
        
        # alias-es
        alias ag "ag --nocolor"