Job Snijders <[email protected]> wrote:

> On Tue, Jun 12, 2018 at 09:54:47AM -0600, Theo de Raadt wrote:
> > I would prefer if the -q and -n descriptions were in a table.  I dislike
> > the ancient style of describing such things inline (harder to spot).
> > And it really falls down when there are multiple ones.  How do you
> > feel about that jmc?
> 
> Agreed, I changed it a bit to improve readability.
> 
> > Also, do -qn and -nq work?  How about -nnn.  Not saying those make a
> > lot of sense, but once getopt syntax is borrowed it should probably be
> > honoured.
> 
> I redid this piece a little bit, and opted to go a bit stricter to leave
> as much freedom as possible for future extensions.
> 
> OK:
>     -n command
>     -n -q command
>     -q -n command
>     -q command
>     command
> 
> Not OK:
>     -nn command
>     -qn command
>     -q -q command
>     -n -n -q command
> 
> My thinking is by being strict now, we make it possible to add arguments
> to options in the future. If we allow "-nn" or "-nq" now, we won't be
> able to allow "[email protected]" in the future. Or maybe we'll want
> "-v" to mean something different than "-vv". I don't know, so prefer to
> be less forgiving.

Well, if it was actual getopt parsing it would work in either case due
to ":" handling.

Shrug.

Reply via email to