lk jasdfksdaklasdfkljklj sadfk jkl

This commit is contained in:
Arthur K. 2025-01-04 18:47:09 +03:00
parent 0c9b0016c6
commit da50f04f9d
Signed by: wzray
GPG key ID: B97F30FDC4636357
11 changed files with 137 additions and 5 deletions

13
.local/bin/scripts/gor Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
url="$(git remote get-url "${1:-origin}")"
if [[ "$url" =~ ^https?:\/\/ ]]; then
echo "$url"
elif [[ "$url" =~ ^[a-zA-Z0-9_-]+@([a-zA-Z0-9_.-]+):(.*) ]]; then
url="https://${BASH_REMATCH[1]}/${BASH_REMATCH[2]}"
url="${url%.git}"
xdg-open "$url"
else
echo "TODO: $url"
fi