From f1c7e7202b6b8a686a68ec161cfee19fcd0fa6bc Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 4 Jul 2024 23:55:00 +0200 Subject: feat(abbrevURL,osurl): add support for Sourcehut issue tracker. Translate from https://todo.sr.ht/~mcepl/m2crypto/341 to srht#mcepl/m2crypto#341, and back. --- abbrevURL | 1 + 1 file changed, 1 insertion(+) (limited to 'abbrevURL') diff --git a/abbrevURL b/abbrevURL index 02cc093..516f202 100755 --- a/abbrevURL +++ b/abbrevURL @@ -19,6 +19,7 @@ STR="$(echo "$STR" | sed -E -e 's@https?://gitlab.com/(.*)/-/issues/([0-9]+)@gl# STR="$(echo "$STR" | sed -E -e 's@https?://gitlab.com/(.*)/-/pull/([0-9]+)@gl#\1!\2@')" STR="$(echo "$STR" | sed -E -e 's@https?://gitlab.com/(.*)/-/merge-requests/([0-9]+)@gl#\1!\2@')" STR="$(ID=${STR#*/commit/}; echo "$STR" | sed -E -e 's!https?://gitlab.com/(.*)/-/commit/([a-zA-Z0-9]+)!gl#\1@'"${ID%"${ID#????????????}"}"'!')" +STR="$(echo "$STR" | sed -E -e 's@https?://todo.sr.ht/~(.*)/([0-9]+)@srht#\1#\2@')" STR="$(echo "$STR" | sed -E -e 's@https?://sourceforge.net/support/tracker.php\?aid=([0-9]+)@sh#\1@')" STR="$(echo "$STR" | sed -E -e 's@https?://sf.net/support/tracker.php\?aid=([0-9]+)@sh#\1@')" STR="$(echo "$STR" | sed -E -e 's@https?://sourceforge.net/p/(.*)/patches/([0-9]+)/@shp#\1#\2@')" -- cgit