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

Re: Use of zerr() vs. zwarn()



> This would appear to be (as I suspected) a simple case of changing some
> calls to zerr() to be calls to zwarn() instead.  However, there are a
> number of other places where zerr() is called that would have to change
> in order to generalize "builtins behave as if forked".
> 
> There also seem to be a number of inconsistencies in whether zerr() or
> zwarn() is used for a particular condition.  The following is an audit
> of places where I think the usage *might* need revision.

With current CVS and exec.c:2178 changed to zwarn, the failed redirection
from a builtin behaves as the failed redirection from a forked command, or
however that should be expressed in English.

I can't see any value to not doing it this way except perhaps in interactive
contexts, and even then it's a bit counterintuitive.  I would expect something
like

echo blah blah blah >>logfile || echo log problem | mailx pagesomeone

to do the same thing as

/bin/echo blah blah blah >>logfile || echo log problem | mailx pagesomeone



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