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

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



Marlon Richert wrote on Sat, May 01, 2021 at 16:39:06 +0300:
> On Sat, May 1, 2021 at 12:16 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > Marlon Richert wrote on Fri, 30 Apr 2021 19:40 +00:00:
> > >
> > > On Wed, Mar 24, 2021 at 4:29 PM Paul <GammaFunction@xxxxxxxxxxx> wrote:
> > > > - I half-agree with not unsetting clobber. noclobber is better default
> > > >   behavior (it prevents much more damaging surprises), but just seeing
> > > >   "file exists" or "no such file or directory" without any '>|' or '>>|'
> > > >   suggestion is frustrating.
> > >
> > > That could use a more helpful message, too.
> >
> > 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.

> and it still doesn't tell them what to do about it
> (use '>|' to override NOCLOBBER or just write to another file).

> 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.




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