(Added) remove all option for groups.

dev
KKlochko 2 years ago
parent a1bcf572e1
commit cf88cdbc9f

@ -35,6 +35,8 @@
** 0.8.4 <2023-03-21 Tue> ** 0.8.4 <2023-03-21 Tue>
Added remove option for groups. Added remove option for groups.
Moved groups logic to .cli.groups. Moved groups logic to .cli.groups.
** 0.8.5 <2023-03-22 Tue> ** 0.8.5 <2023-03-22 Wed>
Added *remove all* option for sources. Added *remove all* option for sources.
** 0.8.6 <2023-03-23 Thu>
Added *remove all* option for groups.

@ -23,6 +23,7 @@ from typing import List, Optional
import typer import typer
from tui_rsync.models.models import Group from tui_rsync.models.models import Group
from tui_rsync.models.models import all_group_labels
from tui_rsync.cli.groups.group_prompt import GroupPrompt from tui_rsync.cli.groups.group_prompt import GroupPrompt
console = Console() console = Console()
@ -46,3 +47,10 @@ def one(
group = Group.get_group(group_label) group = Group.get_group(group_label)
group.delete_instance() group.delete_instance()
@group_remove.command()
def all():
"""
[red b]Remove[/] [yellow] all existing groups[/].
"""
for label in all_group_labels().iterator():
one(label.label)

Loading…
Cancel
Save