|
|
|
@ -5,7 +5,7 @@
@@ -5,7 +5,7 @@
|
|
|
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com> |
|
|
|
|
# |
|
|
|
|
|
|
|
|
|
local remote branches branch current_branch url |
|
|
|
|
local remote branches branch current_branch file url |
|
|
|
|
|
|
|
|
|
remote="${1:-origin}" |
|
|
|
|
url=$( |
|
|
|
@ -18,6 +18,7 @@ branches=($(
@@ -18,6 +18,7 @@ branches=($(
|
|
|
|
|
)) |
|
|
|
|
current_branch="$(git-branch)" |
|
|
|
|
branch="${2:-master}" |
|
|
|
|
file="$3" |
|
|
|
|
|
|
|
|
|
if [[ -z "$2" ]]; then |
|
|
|
|
if (( $branches[(I)$current_branch] != 0 )); then |
|
|
|
@ -28,7 +29,7 @@ if [[ -z "$2" ]]; then
@@ -28,7 +29,7 @@ if [[ -z "$2" ]]; then
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
if [[ -n "$url" ]]; then |
|
|
|
|
url="${url}/tree/${branch}" |
|
|
|
|
url="${url}/tree/${branch}/${file}" |
|
|
|
|
|
|
|
|
|
if (( $+commands[$BROWSER] )); then |
|
|
|
|
"$BROWSER" "$url" |
|
|
|
|