diff --git a/README.md b/README.md index 45e1f69..4e87acf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # git-open -Type `git open` to open the repo website (Github, Gitlab, Bitbucket) in your browser. +Type `git open` to open the repo website (GitHub, GitLab, Bitbucket) in your browser. ![git open2015-01-24 13_51_18](https://cloud.githubusercontent.com/assets/39191/5889192/244a0b72-a3d0-11e4-8ab9-55fc64228aaa.gif) @@ -8,10 +8,10 @@ Type `git open` to open the repo website (Github, Gitlab, Bitbucket) in your bro ```sh git open [remote-name] [branch-name] -git open issue +git open issue ``` -(`git open` works with these [hosted repo providers](#supported-remote-repositories), `git open issue` currently only works with Github) +(`git open` works with these [hosted repo providers](#supported-remote-repositories), `git open issue` currently only works with GitHub) ### Examples @@ -26,7 +26,7 @@ $ git open upstream master # opens https://github.com/REMOTE_UPSTREAM_USER/CURRENT_REPO/tree/master $ git open issue -# If branches use naming convention of issues/#123, +# If branches use naming convention of issues/#123, # opens https://github.com/REMOTE_UPSTREAM_USER/CURRENT_REPO/issues/123 ``` @@ -92,13 +92,13 @@ git-open can automatically guess the corresponding repository page for remotes - github.com - gist.github.com - gitlab.com -- Gitlab custom hosted (see below) +- GitLab custom hosted (see below) - bitbucket.org - Atlassian Bitbucket Server (formerly _Atlassian Stash_) -#### Gitlab support +#### GitLab support -To configure gitlab support you need to set `gitopen.gitlab.domain`: +To configure GitLab support you need to set `gitopen.gitlab.domain`: ```sh # use --global to set across all repos, instead of just the local one diff --git a/git-open b/git-open index 1cfe67b..160be37 100755 --- a/git-open +++ b/git-open @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Opens the github page for a repo/branch in your browser. +# Opens the GitHub page for a repo/branch in your browser. # https://github.com/paulirish/git-open/ # # git open @@ -54,12 +54,12 @@ fi branch=${branch//%/%25} && branch=${branch//#/%23} # URL normalization -# Github gists +# GitHub gists if grep -q gist.github <<<$giturl; then giturl=${giturl/git\@gist.github\.com\:/https://gist.github.com} providerUrlDifference=tree -# Github +# GitHub elif grep -q github <<<$giturl; then giturl=${giturl/git\@github\.com\:/https://github.com/} @@ -68,7 +68,7 @@ elif grep -q github <<<$giturl; then providerUrlDifference=tree -# bitbucket +# Bitbucket elif grep -q bitbucket <<<$giturl; then giturl=${giturl/git\@bitbucket\.org\:/https://bitbucket.org/} # handle SSH protocol (change ssh://https://bitbucket.org/user/repo to https://bitbucket.org/user/repo) @@ -88,16 +88,16 @@ elif grep -q "/scm/" <<<$giturl; then branch="?at=refs%2Fheads%2F${branch}" fi -# Gitlab +# GitLab else - # custom gitlab + # custom GitLab gitlab_domain=$(git config --get gitopen.gitlab.domain) if [ -n "$gitlab_domain" ]; then if grep -q "$gitlab_domain" <<<$giturl; then giturl=${giturl/git\@${gitlab_domain}:/https://${gitlab_domain}/} providerUrlDifference=tree fi - # hosted gitlab + # hosted GitLab elif grep -q gitlab <<<$giturl; then giturl=${giturl/git\@gitlab\.com\:/https://gitlab.com/} providerUrlDifference=tree