lk jasdfksdaklasdfkljklj sadfk jkl
This commit is contained in:
parent
0c9b0016c6
commit
da50f04f9d
11 changed files with 137 additions and 5 deletions
13
.local/bin/scripts/gor
Executable file
13
.local/bin/scripts/gor
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue