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

Re: question about saving history and error reporting



Thanks for the perspective.

On Tue, Dec 22, 2015 at 04:54:33PM -0800, Bart Schaefer wrote:
> On Dec 22, 10:14am, frederik@xxxxxxx wrote:
> }
> } 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?
> 
> The most common reason in the case of inc_append_history could be that
> multiple shells are updating the file at the same time.  There are also
> things like home directories on remote filesystems that are temporarily
> unreachable.
> 
> Really it's not the responsibility of the shell history mechanism to
> alert you about system-wide failure conditions like a full disk, and
> I wouldn't want to encourage anyone to rely on it for that.
> 
> } Are there other cases where Zsh hides errors that occur during its
> } operation?
> 
> That's a rather wide-open question.  The (programmed in shell code)
> completion system deliberately suppresses all sorts of errors that
> might occur during generating the possible matching words, because
> they're irrelevant to updating the command line and displaying them
> would mess up screen for ZLE.  Within the C code, I would not be
> surprised if there are other implicit actions for which displaying
> an error state is considered unnecessarily verbose, but I can't tell
> you of any offhand.
> 



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