Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [2.6-beta9-hzoli9] BUG (patch enclosed) in exec.c?



> 
> Hi Zoltan--
> 
> I recently moved up to beta9-hzoli9, patched from zsh-2.6-beta9 using
> the files:
> 
> 	zsh-2.6-beta9-hzoli9.diff.gz
> 	patch1.gz
> 
> Anyway, I still had problems with zsh wiping out the history file, so
> I did a bit of snooping. In exec.c (at least in my patched hzoli9)
> there are two instances of savehistfile (one near line 1430, the other
> near line 1454). In contrast, there is only one in the baseline
> zsh-2.6-beta9 exec.c (although it's still too buggy for me to use!),
> near line 1442. Should hzoli9's exec.c have two, or did I mispatch it
> somehow? 

I think you patched everything right. And I think that there should be two
places to save the history. One is where you exec a builtin zsh command or a
shell function, and the other is when you exec an external command. The
baseline zsh does not save history when you do

% exec echo bye

But it does save it after

% exec /bin/echo bye

I merely made the two exec's compatible with each other. It seems that your
bug should be reproducible with the baseline as well. Also it seems that it
only happens when you do funy things in your .zshrc. Could you send the
shortest .zshrc which reproduces the bug (as I remeber you already sent
something earlier but I had no time to examine that)? Isn't it done by some
backquote substitution? But I really do not understand exec.c too much, so it
is possible that I did not chose the proper solution for this problem.

Zoltan



Messages sorted by: Reverse Date, Date, Thread, Author