aboutsummaryrefslogtreecommitdiffstats
path: root/abbrevURL
diff options
context:
space:
mode:
Diffstat (limited to 'abbrevURL')
-rwxr-xr-xabbrevURL13
1 files changed, 0 insertions, 13 deletions
diff --git a/abbrevURL b/abbrevURL
index 5c0f6ee..02cc093 100755
--- a/abbrevURL
+++ b/abbrevURL
@@ -9,19 +9,6 @@ else
STR="$1"
fi
-# Conditional branching with exit status ... I am not sure what do I need it for.
-# So for example
-#
-# $ echo "foo.bar" | sed 's/bar.*$//; t; q42' ; echo $?
-# foo.
-# 0
-#
-# whereas
-#
-# $ echo "foo.bar" | sed 's/baz.*$//; t; q42' ; echo $?
-# foo.bar
-# 42
-
STR="$(echo "$STR" | sed -E -e 's@https?://github.com/(.*)/issues/([0-9]+)@gh#\1#\2@')"
STR="$(echo "$STR" | sed -E -e 's@https?://github.com/(.*)/pull/([0-9]+)@gh#\1!\2@')"
STR="$(echo "$STR" | sed -E -e 's@https?://github.com/(.*)/discussions/([0-9]+)@gh#\1\$\2@')"