commit 3aed162e6bd609d5a98352a220f2caeb7c98fd6e
parent 57e506a9ca82a4191bd64c0a9056e9db7fcecb3c
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Sat, 23 May 2020 22:29:14 +0200
Use stricter pattern for matching dois
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.local/bin/plumb b/.local/bin/plumb
@@ -198,7 +198,7 @@ handle_target() {
zathura "$(fetch "$t")"
elif regeximatch "$t" '(smbc-comics\.com|xkcd\.com|jspowerhour\.com)'; then
cd /tmp && detach comic "$t"
- elif regexmatch "$t" '10\.[0-9]*\/'; then
+ elif regexmatch "$t" '.*doi.*10\.[0-9]*\/'; then
detach $BROWSER "https://doi.org/${t}"
elif regexmatch "$t" '\.(txt|patch|diff|rst|md)$'; then
f="$(fetch "$t")"