add moveing of tabs and groups, multi browser support, auto complite into terminal, extract html and adding testing
This commit is contained in:
@@ -100,3 +100,20 @@ def group_add_tab(group, url):
|
||||
tab_id = result.get("tabId") if isinstance(result, dict) else result
|
||||
label = url or "new tab"
|
||||
console.print(f"[green]Opened {label}[/green] in group '{group}' (tab id: {tab_id})")
|
||||
|
||||
|
||||
@group_group.command("move")
|
||||
@click.argument("group")
|
||||
@click.option("--forward", is_flag=True, help="Move group one position to the right")
|
||||
@click.option("--backward", is_flag=True, help="Move group one position to the left")
|
||||
def group_move(group, forward, backward):
|
||||
"""Move a tab group forward or backward (name or ID)."""
|
||||
if not forward and not backward:
|
||||
console.print("[red]Specify --forward or --backward[/red]")
|
||||
raise SystemExit(1)
|
||||
result = _handle("group.move", {"group": group, "forward": forward, "backward": backward})
|
||||
if isinstance(result, dict) and not result.get("moved"):
|
||||
console.print(f"[yellow]Group '{group}' is already at the {'end' if forward else 'start'}[/yellow]")
|
||||
else:
|
||||
direction = "forward" if forward else "backward"
|
||||
console.print(f"[green]Group '{group}' moved {direction}[/green]")
|
||||
|
||||
Reference in New Issue
Block a user