Parametrize discard command
This commit is contained in:
parent
79e57e4c07
commit
32cbbaeed8
@ -103,9 +103,16 @@ def revert(uid):
|
|||||||
raise click.BadParameter(str(er))
|
raise click.BadParameter(str(er))
|
||||||
|
|
||||||
@changes.command()
|
@changes.command()
|
||||||
def discard():
|
@click.argument('uids', nargs=-1)
|
||||||
change.discard_all()
|
@click.option('--all', is_flag=True, default=True)
|
||||||
|
def discard(uids, all):
|
||||||
|
"""
|
||||||
|
uids argument should be of a higher priority than all flag
|
||||||
|
"""
|
||||||
|
if uids:
|
||||||
|
change.discard_uids(uids)
|
||||||
|
elif all:
|
||||||
|
change.discard_all()
|
||||||
|
|
||||||
@changes.command()
|
@changes.command()
|
||||||
@click.option('--name', default=None)
|
@click.option('--name', default=None)
|
||||||
|
Loading…
Reference in New Issue
Block a user