Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: History file locking?
- X-seq: zsh-workers 916
- From: Daniel Dignam <daniel@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: History file locking?
- Date: Wed, 10 Apr 1996 23:16:57 +0100
- Organization: EDS Unigraphics, Cambridge, England
- References: <199604102121.XAA08127@xxxxxxxxxxxxxxxxx> <960410144122.ZM17336@xxxxxxxxxxxxxxxxx>
- Sender: daniel@xxxxxxxxxx
Hmm,
I've been using the following for years (I'm currently on 2.4.333
beta)
precmd () {
fc -nl -1 | concat $MY_HISTFILE
}
Were concat is a simple little program which gurantees you get a lock
(via some remote server proc). Then the .zshrc does something along the
lines of:
tail -200 $MY_HISTFILE >/tmp/g$$
fc -R /tmp/g$$
/bin/rm /tmp/g$$
It amazing how useful a shell history stretching back for a year can
be.
As Bart said earlier, "if you can do it with an external process, it
doesn't belong in the shell"
Coping with locking over NFS is not a nice hole.
--
Daniel Dignam, mailto:daniel@xxxxxxxxx
Assemblies Development Phone: +44 1223-371591
EDS Unigraphics FAX: +44 1223-316931
http://www-sdl.ug.eds.com/ug_assemblies.html
Messages sorted by:
Reverse Date,
Date,
Thread,
Author