Update @cmdutils.argument docs

This commit is contained in:
Florian Bruhin 2016-05-10 20:15:33 +02:00
parent 2370793f38
commit 1d5fc4a140

View File

@ -446,11 +446,17 @@ flag an argument should get:
[source,python]
----
@cmdutils.register(...)
@cmdutils.arg('bar', flag='c')
@cmdutils.argument('bar', flag='c')
def foo(bar):
...
----
The following arguments are supported for `@cmdutils.argument`:
- `flag`: Customize the short flag (`-x`) the argument will get.
- `win_id=True`: Mark the argument as special window ID argument
- `count=True`: Mark the argument as special count argument
The name of an argument will always be the parameter name, with any trailing
underscores stripped.