>>>>> On Mon, 1 Sep 2014, Michał Górny wrote: > 1. Options must precede positional parameters on the command-line. > Interspersing options and positional parameters is not allowed.
> 2. Each short option must be specified as a separate parameter.
> Specifying multiple short options in one parameter is not allowed.
> 3. If a helper supports any options, then the positional parameters
> may not resemble options. In particular, passing any positional
> parameters beginning with '-' is not allowed.
> 4. [optionally] If a helper supports any options, '--' option may be
> used to terminate option parsing. All parameters following it will
> be treated as positional parameters, and rule 3. doesn't apply to
> parameters following '--'.
> 5. Helpers should define both short and long variants for each
> option they provide.
> 6. If the option takes a parameter, it should be passed as
> the parameter immediately following it. Concatenating option
> and the parameter is not allowed. Interspersing multiple options
> and their parameters is not allowed.
There is a standard for options and their arguments [1]. It is
implemented in the getopt(3) function in C and in the getopts(1)
command, which is a bash builtin.
So if we are going to change anything with respect to option parsing
in package manager commands, then lets please stick to these
established guidelines, instead of inventing our own (at least partly)
incompatible rules.
Ulrich
[1] Utility Syntax Guidelines 3 to 10,
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html#tag_12_02
pgp3zVroonOC7.pgp
Description: PGP signature
