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

Re: question about saving history and error reporting

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.

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