Update prompt text for clarity
This commit is contained in:
parent
f78bc64e98
commit
c363a36367
6
oxo.py
6
oxo.py
|
@ -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="")
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue