mirror of
https://github.com/paulirish/git-open.git
synced 2026-09-14 01:16:20 -04:00
Merge pull request #27 from davidosomething/with-rev
Open to source in current dir
This commit is contained in:
commit
9dced58c8c
8
git-open
8
git-open
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Opens the github page for a repo/branch in your browser.
|
||||
# https://github.com/paulirish/git-open/
|
||||
|
|
@ -56,7 +56,9 @@ elif grep -q github <<<$giturl; then
|
|||
# bitbucket
|
||||
elif grep -q bitbucket <<<$giturl; then
|
||||
giturl=${giturl/git\@bitbucket\.org\:/https://bitbucket.org/}
|
||||
providerUrlDifference="src"
|
||||
rev="$(git rev-parse HEAD)"
|
||||
git_pwd="$(git rev-parse --show-prefix)"
|
||||
providerUrlDifference="src/${rev}/${git_pwd}"
|
||||
branch="?at=${branch}"
|
||||
|
||||
# Atlassian Stash
|
||||
|
|
@ -97,7 +99,7 @@ case $( uname -s ) in
|
|||
Darwin) open=open;;
|
||||
MINGW*) open=start;;
|
||||
CYGWIN*) open=cygstart;;
|
||||
*) open=xdg-open;;
|
||||
*) open=${BROWSER:-xdg-open};;
|
||||
esac
|
||||
|
||||
# open it in a browser
|
||||
|
|
|
|||
Loading…
Reference in a new issue