aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lolbin/cli.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lolbin/cli.py b/src/lolbin/cli.py
index f976e54..49b3b2b 100644
--- a/src/lolbin/cli.py
+++ b/src/lolbin/cli.py
@@ -459,7 +459,21 @@ def app():
case name:
if paste_name is None:
- paste_name = name
+ if name.startswith("@"):
+ if name.startswith("@@"):
+ paste_name = name[1:]
+ else:
+ if not replace_address:
+ replace_address = True
+ if "address" in config:
+ # NOTE: Otherwise the token can't be correct
+ config["bearer_token"] = None
+
+ config["address"] = name[1:]
+ else:
+ paste_name = name
+ else:
+ paste_name = name
else:
print(
f"Ambiguous paste name. Aborting. {name} or {paste_name}",