Re: [dev] [PATCH 1/2] find: "-" by itself is a file name

2018-11-02 Thread Quentin Rameau
> No, I just left an operator there when rewriting the chain, here's the > corrected one: > > return strcmp(arg, "-") || strcmp(arg, "!") && strcmp(arg, "("); Ah, forget about it, I'm not focused. return strcmp(arg, "!") && strcmp(arg, "(") || !strcmp(arg, "-");

Re: [dev] [PATCH 1/2] find: "-" by itself is a file name

2018-11-02 Thread Quentin Rameau
> > Why not: > > > > return strcmp(arg, "-") || && strcmp(arg, "!") && strcmp(arg, "("); > > Not sure what you're recommending here. Maybe > > return (arg[0] != '-' || !strcmp(arg, "-")) && strcmp(arg, "!") && > strcmp(arg, "("); > > ? No, I just left an operator there when rewriting the chain

Re: [dev] [PATCH 1/2] find: "-" by itself is a file name

2018-11-02 Thread Tavian Barnes
On Fri, 2 Nov 2018 at 09:47, Quentin Rameau wrote: > > > My interpretation of the linked thread was that "starts with" is > > supposed to mean a strict prefix in POSIX, so "-" doesn't start with > > "-". I haven't found anything in the standard that says that > > explicitly though. If you'd rath

Re: [dev] [PATCH 1/2] find: "-" by itself is a file name

2018-11-02 Thread Quentin Rameau
> My interpretation of the linked thread was that "starts with" is > supposed to mean a strict prefix in POSIX, so "-" doesn't start with > "-". I haven't found anything in the standard that says that > explicitly though. If you'd rather interpret "starts with" to include > exact matches, feel fr

Re: [dev] [PATCH 1/2] find: "-" by itself is a file name

2018-11-02 Thread Tavian Barnes
On Fri, 2 Nov 2018 at 04:22, Quentin Rameau wrote: > > Hello Tavian, > > > See https://savannah.gnu.org/bugs/?15235 for a discussion of why the > > POSIX wording implies that "-" by itself is not part of the expression. > > I think this was a pedantly wrong interpretation of the standard. It cert

Re: [dev] [st][PATCH] better plumbing on linux: find child shell cwd without shell gymnastics

2018-11-02 Thread John Soros
On 01/11/2018 09:33, Quentin Rameau wrote: > > Is that a Linux‐only patch? > Hi Quentin, It isn't anymore. Regs, John

Re: [dev] [st][PATCH] better plumbing on linux: find child shell cwd without shell gymnastics

2018-11-02 Thread John Soros
On 01/11/2018 17:54, Markus Wichmann wrote: > On Thu, Nov 01, 2018 at 04:12:40PM +0100, John Soros wrote: >> Yes! This is much, much better! Thanks. Pity that it still doesn't work >> on OpenBSD. > > If the info I gathered over the course of the last hour is correct, then > the way to query CWD in

Re: [dev] [PATCH 1/2] find: "-" by itself is a file name

2018-11-02 Thread Quentin Rameau
Hello Tavian, > See https://savannah.gnu.org/bugs/?15235 for a discussion of why the > POSIX wording implies that "-" by itself is not part of the expression. I think this was a pedantly wrong interpretation of the standard. The specification has been reworded since to prevent this: “The first