> > > I am using the latest cygwin install including zsh version zsh 4.0.6
> > > (i686-pc-cygwin).
> > > Here's the problem. When I do
> > > $ fc -e vi 14
> > > to edit history line 14, I get the following error upon exiting
> > > zsh: read error on /tmp/zsh001043
...
> > The same happens to me (zsh 4.0.6) when /tmp/zsh001043 becomes
> > empty. Try to save that file with a single <space> character.
> > If that really bothers you, you may try:
> > function vi4fc () { vi $1; [[ -s $1 ]] || echo >> $1 }
> > fc -e vi4fc 14
> Thanks for your suggestion. The problem is that the fc-edited command
> is NOT executed AND the 'read error' message is reported. I could
> live w/ the complaint so long as the fc-edited command was executed.
> Also, I'm not sure what you mean in your post by "Try to save that
> file with a single <space> character". I tried the function vi4fc that
> you defined but I still have the same problem.
I see. I have no problem to execute the commands. I am getting that
message only, when I delete all of the command line in vi,
i.e. when the saved file becomes empty. The vi4fc function
only ensures that the file contains at least 1 character (1 line
feed).
Quote:> Any other suggestions? Thanks for your help.
May be there are some strange settings, which cause this problem.
Try to run zsh -fx and see what happens. The option -f
(NO_RCS) tells zsh to ignore all initialization files except
/etc/zshenv; -x turns on XTRACE, which tells zsh to
print everything what is done.
Also, are you using cygwin version of vi/vim? Note, that in
cygwin /tmp is in fact c:\cygwin\tmp, or something
similar (see the output of mount). If you call windows version of
vi/vim, it would edit c:\tmp\zsh001043. On my cygwin I have
mounted /tmp to c:\tmp, so I can use the same tmp path
(/tmp or \tmp) in all programs.
HTH,
Pavol