On Fri, 22 Apr 2016 10:15:38 +0100
Dimitris Papastamos <[email protected]> wrote:

> Ok, so when you have (-a | -b) it means that flag choice
> is not optional.
> 
> Can we avoid trying to express valid flag combos in a
> single line and instead use multiple usage lines?  In
> some cases, like in hwclock it is not a major issue and
> this can be left as is.
> 
> If people are in doubt they can refer to the manpage.
> 
> My only concern is that this () pattern is not as
> wide-spread and confuses people.
> 
> If others agree, we should sweep core existing core tools
> that use () and rework them.

I believe that () shall be used when and only when it is
easier to express it syntax (). For example

  (-a | -b | -c) (-A | -B | -C)

rather than

  -a -A
  -a -B
  -a -C
  -b -A
  -b -B
  -b -C
  -c -A
  -c -B
  -c -C

But

  -a [-xyz]
  -b [-XYZ]
  -c [-ABC]

rather than

  (-a [-xyz]) | (-b [-XYZ]) | (-c [-ABC])

Attachment: pgpFQIdXwFhu0.pgp
Description: OpenPGP digital signature

Reply via email to