Unable to share csh history between terminals

Mike Clarke jmc-freebsd2 at milibyte.co.uk
Sat Mar 13 20:26:47 UTC 2021

After googling how to do this I ended up with the following in ~/.cshrc

alias postcmd 'history -S; history -M'
set history = 1000
set histdup = erase
set savehist = (1000 merge)

But the results were disastrous, instead of sharing the history each terminal opened 
with a fresh empty history and wiped out the previous .history file.

What am I doing wrong?

When I remove the postcmd alias I revert to the previous arrangement where each 
terminal window starts with the contents of .history and stores its entire history back 
into the file on exit.

Mike Clarke

More information about the freebsd-questions mailing list