Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: question about saving history and error reporting
On Mon, Dec 21, 2015 at 12:54:50PM -0800, Bart Schaefer wrote:
> On Dec 21, 12:38pm, frederik@xxxxxxx wrote:
> }
> } My disk filled up recently and I noticed that although Zsh was not
> } able to write to the history file, it did not print any error
> } messages.
>
> Incremental appends do not generate error messages (cf. hist.c:1105
> where the second argument to savehistfile() is zero).
>
> This is because (a) it would mean up to two error messages per command
> executed, which could make normal use of the shell difficult/annoying,
> and (b) it's assumed there will be another attempt later, either on the
> next command or at shell exit, so there's no reason to report transient
> error conditions.
>
> Most likely you are not seeing the error that is generated at shell exit
> because your terminal window has already closed.
>
> It's possible that we could examine errno and decide to issue the error
> anyway in potentially critical situations.
>
Thank you for the reply. But don't most people use terminal windows,
or screen, or some other tool which hides whatever output zsh produces
on exit?
For me, if the history can't be written, it would be convenient to
know about the errors that are being generated immediately, so that I
can fix the problem. Are there many situations where the history can't
be written due to a problem which is transient? Are there other cases
where Zsh hides errors that occur during its operation?
Well, perhaps I can just patch hist.c locally...
Thanks,
Frederick
Messages sorted by:
Reverse Date,
Date,
Thread,
Author