commit ab2c26289a21ada95892e5d5e312d7241e612899
parent 3583f5a86e4a5d502a9be11aab3ad0315c37b18a
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Mon, 7 Sep 2020 15:23:59 +0200
Remove prefix from DOIs
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/.local/bin/plumb b/.local/bin/plumb
@@ -203,6 +203,8 @@ handle_url() {
elif regeximatch "$t" '(smbc-comics\.com|xkcd\.com|jspowerhour\.com|explosm\.net)'; then
cd /tmp && detach comic "$t"
elif regexmatch "$t" '^doi.*10\.[0-9]*\/'; then
+ t="${t#doi://}"
+ t="${t#doi:}"
detach $prefix $BROWSER "https://doi.org/${t}"
elif regexmatch "$t" '\.(txt|patch|diff|rst|md|vtt|vtv)$'; then
f="$(fetch "$t")"