[RFC] Some options should be 'common', not 'global'

Ian Clatworthy ian.clatworthy at internode.on.net
Mon Aug 27 02:16:51 BST 2007


Jari Aalto wrote:
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.
[snip]
> 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,

Your suggestion is an interesting one. It does feel more complex though
than simply having 3 levels and using those wisely across the product.
Can you think of a command within bzr that really needs more than 3 levels?

My preference for the times when quiet/normal/verbose is not enough is
to name the additional types of output wanted, a bit like we do right
now with debug_flags. That seems more useful and indeed more powerful
than needing to decide exactly what makes the most sense at numerous
levels of high verbosity. It can be challenging for UI designers to
predict in advance what makes sense in terms of levels, for different
types of users to agree, and for users to remember whether they really
want level 4 vs level 5 say.

Likewise, I like the fact that -q means a certain thing - nothing except
errors and warnings - and scripts can rely on that. If -q simply means
'one level less verbosity than current', then it's not predictable in
scripts. I appreciate that having LEVEL as an optional parameter means
scripts could do -q0 to achieve that, of course.

I could be wrong but I don't think we have any options right now with
optional arguments. In other words, the LEVEL would currently always
have to be provided? I don't know whether that's because we simply
haven't added them or whether it was a conscious UI design decision.
Perhaps Aaron could shed some light on that topic? Personally, I like
them but it does mean users need to appreciate that "-xy" means "-x -y"
in some cases and "-x y" in others.

Ian C.



More information about the bazaar mailing list