From 465c13761908e3da8f395228a312af6cf2b87dbe Mon Sep 17 00:00:00 2001 From: Miguel Piedrafita Date: Wed, 31 May 2017 21:17:59 +0200 Subject: [PATCH 1/2] Handle urls without the github domain --- git-open | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/git-open b/git-open index 1397a00..28cab73 100755 --- a/git-open +++ b/git-open @@ -65,6 +65,12 @@ elif grep -q github <<<"$giturl"; then # handle urls with the git user giturl=${giturl/#github\.com\:/https://github.com/} + + # handle urls without the github domain with git user + giturl=${giturl/#github\:/https://github.com/} + + # handle urls without the github domain + giturl=${giturl/#ssh\:\/\/git\@github\//https://github.com/} # handle SSH protocol (links like ssh://git@github.com/user/repo) giturl=${giturl/#ssh\:\/\/git\@github\.com\//https://github.com/} From 1178e2b60ee7c00dd734046abc6cf313d60b0899 Mon Sep 17 00:00:00 2001 From: Miguel Piedrafita Date: Wed, 31 May 2017 21:21:55 +0200 Subject: [PATCH 2/2] cs --- git-open | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-open b/git-open index 28cab73..03ad802 100755 --- a/git-open +++ b/git-open @@ -62,13 +62,13 @@ if grep -q gist.github <<<"$giturl"; then # GitHub elif grep -q github <<<"$giturl"; then giturl=${giturl/git\@github\.com\:/https://github.com/} - + # handle urls with the git user giturl=${giturl/#github\.com\:/https://github.com/} - + # handle urls without the github domain with git user giturl=${giturl/#github\:/https://github.com/} - + # handle urls without the github domain giturl=${giturl/#ssh\:\/\/git\@github\//https://github.com/}