Update @cmdutils.argument docs
This commit is contained in:
parent
2370793f38
commit
1d5fc4a140
@ -446,11 +446,17 @@ flag an argument should get:
|
|||||||
[source,python]
|
[source,python]
|
||||||
----
|
----
|
||||||
@cmdutils.register(...)
|
@cmdutils.register(...)
|
||||||
@cmdutils.arg('bar', flag='c')
|
@cmdutils.argument('bar', flag='c')
|
||||||
def foo(bar):
|
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
|
The name of an argument will always be the parameter name, with any trailing
|
||||||
underscores stripped.
|
underscores stripped.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user