[RFC] Some options should be 'common', not 'global'
Jari Aalto
jari.aalto at cante.net
Fri Aug 24 07:38:04 BST 2007
Ian Clatworthy <ian.clatworthy at internode.on.net> writes:
> In discussion on IRC today with Aaron re the nuances of implementing
> noise levels for commit, we came to the conclusion that there may be a
> good case for 3 types of options:
>
> * global - parsed specially with resulting limitations (e.g. can't be
> used in aliases)
>
> * common - options always allowed for all commands, even if commands
> decide to ignore them
>
> * command-specific - as now.
>
> In other words, we want to introduce "common" options over and above the
> existing stuff. Unlike global options, these would be supported in
> aliases and commands could provide custom help text for them.
>
> The first set of common options would be an enumeration of noise levels,
> namely --quiet (-q), --normal (-n?), --verbose (-v).
The concept is welcomed. Let me suggest more straight forward
treatment. It's customary to either add an argument to the option or
repeat it several times to make it N times stronger.
So, do not implement this option:
--normal
Instead define:
--verbose [LEVEL]
--quiet [LEVEL]
where these would be equivalent. The level 10 is imaginary maximum
level, program may choose to implement only 3, but allow naturally
higher numbers.
--verbose 0 <=> --quiet 10 (no verbose, maximum quietness)
Perhaps for completeness:
--noverbose (same as --quiet 10 i.e. silence)
--noquiet (no-op, just for completeness
display the default messages)
The optional LEVEL:
--verbose <=> --verbose 1
--quiet <=> --quiet 1
That is, repeated options increase the effect, examples:
--verbose --verbose (or -v -v, -vv) <=> --verbose 2
--quiet --quiet (or -q -q, -qq) <=> --quiet 2
Jari
More information about the bazaar
mailing list