* HISTFILE in zsh on Cygwin
@ 2006-12-24 21:36 Eli Barzilay
0 siblings, 0 replies; only message in thread
From: Eli Barzilay @ 2006-12-24 21:36 UTC (permalink / raw)
To: zsh-users
I posted this question on the cygwin list, but got no replies, so
trying here too. I'm having the same problem that is described at
http://www.cygwin.com/ml/cygwin/2004-12/msg00195.html
I'm surprised that it was reported in 2004 -- I use cygwin on several
machines with no problems, it's only a new one that is having the
above symptom.
(Which is related to saving/loading the history file -- `fc -R foo'
and `fc -W foo' also hang. Using strace, it looks like the problem is
some kind of an infinite loop that is related to a lock file for the
history file. I can provide the strace if it will help.)
My solution for now, is to hack my own history read/write (which works
for my, but it would be nice if the shell was doing what it is
supposed to do...).
MYHISTFILE="$HISTFILE"
unset HISTFILE
while read L; do
print -s "$L"
done < "$MYHISTFILE"
TRAPEXIT() {
if [[ "$HISTCMD" != "0" ]]; then
echo "Saving history..."
if [[ ! -e "$MYHISTFILE" ]]; then touch "$MYHISTFILE"; fi
fc -ln 0 -1 >> "$MYHISTFILE"
rm -f "$MYHISTFILE-$$"
tail -n "$SAVEHIST" "$MYHISTFILE" > "$MYHISTFILE-$$"
cat "$MYHISTFILE-$$" > "$MYHISTFILE"
rm -f "$MYHISTFILE-$$"
fi
}
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-24 21:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-24 21:36 HISTFILE in zsh on Cygwin Eli Barzilay
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).