Options order....

Marcin Kasperski Marcin.Kasperski at softax.com.pl
Mon May 7 08:26:46 UTC 2007


> However, the standard Python option parser allows you to act
> consistent with other unixes.
>
> http://docs.python.org/lib/optparse-other-methods.html second
> bullet.
>

Well, according to this page it is trivial to switch to more 
relaxed scheme. So there is only philosophical discussion here,
not implementation problem.

> "This restores traditional Unix syntax, where option parsing
> stops with the first non-option argument."

Hmm. Traditional unix has for instance /bin/sh without history, 
completion, etc. Nevertheless everybody is using bash nowadays, 
and there even exist mercurial completion for it ;-)

> Having had to *write* documentation explaining optional versus
> non-optional parameters, it's a lot easier to tell people what
> the command lines should look like when you reduce the amount
> of needless permutations of command line inputs.

I must say, I do not understand. If only options matter, not 
their position, then you just say that you can write them in any 
order and are done. You can also recommend any way of writing
you like in docs.

And, let me return to the initial example. When I issue
	ht ci . -m 'Blah blah'
mercurial is trying to commit the files
     '.'
     '-m'
     'Blah blah'
Does there exist *any* case when this is an expected behaviour?



More information about the Mercurial mailing list