Update prompt text for clarity

This commit is contained in:
grym 2022-12-14 19:52:41 -05:00
parent f78bc64e98
commit c363a36367
1 changed files with 3 additions and 3 deletions

6
oxo.py
View File

@ -178,9 +178,9 @@ def shorten(urls: t.List[str] = typer.Argument(..., min=1), base_url=BASE_URL):
typer.echo(post_shorten(base_url, urls))
def did_confirm(token: TokenData) -> bool:
def did_confirm(token: TokenData, filename: Path) -> bool:
confirm = inquirer.Confirm(
"delete", message=f"delete {token.oxo_url}?", default=True
"delete", message=f"delete {filename.name} ({token.oxo_url})?", default=True
)
res = inquirer.prompt([confirm])
return res["delete"]
@ -206,7 +206,7 @@ def delete(
with httpx.Client() as client:
for token, token_file in zip(tokens, good_tokens):
try:
if (interactive and did_confirm(token)) or not interactive:
if (interactive and did_confirm(token, token_file)) or not interactive:
res = client.post(
token.oxo_url, data=dict(token=token.token, delete="")
)