[Xorp-hackers] Cli style guide draft

Hasso Tepper hasso@linux.ee
Sat, 15 Apr 2006 21:55:06 +0300


Eddie Kohler wrote:
> > There are some cli's which are using msec rarely if they are moving
> > timers from seconds to milliseconds - ie. there is old command
> > "some-timer" and the new one "some-timer-msec".
>
> This is a really strong argument for explicit units.

Nope. I said in _rare_ cases. It's only in case if older software version 
had command with arguments in seconds and the new one introduces the new 
command with arguments in milliseconds. And I have seen it done only in 
case there is overlap in ranges of old and new command. So, it's not done 
to gave to you info about units, it's done because software can say to 
you "You are dooooomed!" during upgrade ;).

> It is not really annoying to type "s" or "ms" (which are also
> reasonable abbreviations); and as in Click a straight integer could
> default to "s", leaving "ms" for the uncommon case.

It depends on context. In RIP seconds are common case, in link state 
protocol milliseconds are common.

And I don't think that comparing click and xorp is fair here. Xorp is 
meant to be configured through cli and for cli users info about units is 
all there. It's quite hard to avoid short help in cli ;).


-- 
Hasso Tepper