remove the --profile flag on windows open and add opening a new window with a url
This commit is contained in:
@@ -100,9 +100,9 @@ def windows_close(window_id):
|
||||
|
||||
|
||||
@windows_group.command("open")
|
||||
@click.option("--profile", default=None, help="Open with a specific Chrome profile name")
|
||||
def windows_open(profile):
|
||||
@click.argument("url", required=False)
|
||||
def windows_open(url):
|
||||
"""Open a new browser window."""
|
||||
result = _handle("windows.open", {"profile": profile})
|
||||
result = _handle("windows.open", {"url": url})
|
||||
wid = result.get("id") if isinstance(result, dict) else result
|
||||
console.print(f"[green]Opened new window[/green] (id: {wid})" + (f" with profile '{profile}'" if profile else ""))
|
||||
console.print(f"[green]Opened new window[/green] (id: {wid})" + (f" with {url}" if url else ""))
|
||||
|
||||
Reference in New Issue
Block a user