[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] stop run-time option processing after "--"

From: Peter Bex
Subject: Re: [PATCH] stop run-time option processing after "--"
Date: Tue, 14 Mar 2023 08:43:52 +0100

On Tue, Mar 14, 2023 at 08:40:18AM +0100, wrote:
> > Of course.  In fact, I think it would make more sense to simply tell the
> > runtime options parser to stop after the first non-"-:"-prefixed
> > argument.  That makes runtime argument stuffing harder and allows it
> > to play nice with _any_ option parser, and makes the "--" behaviour
> > automatically work if the program already handles getopt-style options.
> That's another idea. Backwards compatibility is from now on
> fucked anyway, so let's try to find somethin simple and sensible.

Then we should do both.  I.e., have -: to explicitly tell it to stop
parsing (and have that dropped from the command-line-options) and
stop at the first argument.  The -: would be in situations where
a script just passes on all its arguments, like

./my-program -: "$@"


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]