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

Re: sysexits.h codes? (was: Re: [RFC][PATCH] `newuser` prompt theme)



On Sat, May 1, 2021 at 5:43 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> Marlon Richert wrote on Sat, May 01, 2021 at 16:39:06 +0300:
> > > Yeah.  The code should say what it was trying to do when it called the
> > > syscall which returned that error; i.e., «zerrnam(foo, "while doing bar:
> > > %e", errno)» rather than «zerrnam(foo, "%e", errno)».
> >
> > That still wouldn't help the user understand why this happens (because
> > NOCLOBBER is set)
>
> NO_CLOBBER being set could be an action at a distance, so it'd be
> reasonable for stderr to mention it.  Feel free to propose new text.

Is there any precedent for warnings/errors that mention a shell option
being (un)set? If so, then we could use that as a template for this
one.

Otherwise, maybe something like this?

zsh: NO_CLOBBER: file exists; use >| to override

It would give you the right keywords to use in a web search.


> > As for your other points: Your call. I've laid out my arguments; I
> > have nothing further to add.
>
> What, are you asking me to make all design decisions myself?  That's not
> how this list works.

Sorry, I don't feel strongly enough about this to feel like debating it. :)




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