You can clone with
HTTPS or Subversion.
I'm seeing a strange behavior when using globaloptions - specifying this keyword argument to dispatch seems to override the arguments introspected from the function.
This should reproduce it: https://gist.github.com/3672842
Hm, interesting, thanks for report. I'll try to fix this ASAP.
Hm, I can't reproduce it. Which version of opster do you use?
Oh well, I'm sorry, I actually can. I'll consider that's a bug since I should improve error messaging somehow, but in short - add parameters to your commands so that they can receive those globaloptions. Even **kwargs will be enough.
Oh, I see.
Adding **kwargs to the argument list of every function is probably the only suitable way to fix this, actually. Manually adding parameters for each individual global option (e.g. username=None, password=None) will lead to an incorrect usage string. You'll get bug.py read PAGE [USERNAME] [PASSWORD], even though these can't be passed as positional arguments.
bug.py read PAGE [USERNAME] [PASSWORD]
Well, you can always pass your own usage string in @command(usage="PAGE").