What about this?
#include
int main(int argc, const char **argv) {
int i;
const char *fallback[] = { "y", NULL };
argv = argc <= 1 ? fallback : argv + 1;
for (;;) {
for (i = 0; argv[i]; ++i) {
if (i)
On 2019-06-28, Laslo Hunhold wrote:
>> Rather than add a special ENOFLAGS macro, I am tempted to revert
>> 9016d288 instead. The question that remains is how to handle arguments
>> that look like options (start with `-`) for tools that don't have any
>> specified options. It seems for some tools i
On 2019-06-28, Michael Forney wrote:
> As far as I know, unless the documentation states that a utility shall
> conform to the Utility Syntax Guidelines, it is not required to
> support `--`. However, it does use the language "should" which
> means[2]:
>
> For an implementation that conforms
On Fri, 28 Jun 2019 00:52:33 -0700
Michael Forney wrote:
Dear Michael,
> I'm really sorry for ignoring this for so long. Someone asked me about
> the `argv0 = *argv, argv0 ? (argc--, argv++) : (void *)0;` one-liner,
> and I remembered this patch. I finally took the time to investigate
> this iss
Hi Mattias,
I'm really sorry for ignoring this for so long. Someone asked me about
the `argv0 = *argv, argv0 ? (argc--, argv++) : (void *)0;` one-liner,
and I remembered this patch. I finally took the time to investigate
this issue in more detail.
On 2018-07-08, Mattias Andrée wrote:
> In POSIX-
On Fri, 28 Jun 2019 01:06:56 -0700
Michael Forney wrote:
Dear Michael,
thanks for your quick feedback!
> I think we are all on the same page here about simplifying yes(1)
> rather than optimizing it. See aidanwillie0317's most recent patch.
> (I think you mean "space separated" here)
Yes, my
> Dear Quentin,
Hi Laslo,
> > I agree, yes is neither a benchmark tool nor a data generator, it just
> > outputs 'y' for piping into other commands.
> > Keep it simple.
>
> I agree with you in general, but are we really "optimizing" yes(1) here
> for the sake of performance? This looks to me lik
On 2019-06-27, Laslo Hunhold wrote:
> On Thu, 27 Jun 2019 09:10:28 +0200
> Quentin Rameau wrote:
>
> Dear Quentin,
>
>> I agree, yes is neither a benchmark tool nor a data generator, it just
>> outputs 'y' for piping into other commands.
>> Keep it simple.
>
> I agree with you in general, but are