Andy Mikhailenko
unread,Oct 29, 2013, 2:08:21 AM10/29/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to argh-...@googlegroups.com
The best method is to add a special argument to the parser:
parser = argh.ArghParser()
parser.add_commands([foo, bar])
parser.add_argument('--version', action='version', version=__version__)
parser.dispatch()
As you see, this is not Argh-specific. I think it might be a good idea
to also add a shortcut in Argh to enable something like this:
argh.dispatch_command(foo, version=__version__)
If you think so too, please create an issue.
Andy