1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-06-14 08:41:43 +00:00

Added the ability to browse GitHub files.

This commit is contained in:
Sorin Ionescu
2012-02-02 18:25:21 -05:00
parent 304530d990
commit 1a3940b9a3
2 changed files with 10 additions and 4 deletions

View File

@ -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=($(
))
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
fi
if [[ -n "$url" ]]; then
url="${url}/tree/${branch}"
url="${url}/tree/${branch}/${file}"
if (( $+commands[$BROWSER] )); then
"$BROWSER" "$url"