diff options
Diffstat (limited to 'git-instaweb.sh')
-rwxr-xr-x | git-instaweb.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh index ad0723ccc6..3e4452bc4b 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -274,6 +274,14 @@ webrick) ;; esac +init_browser_path() { + browser_path="`git config browser.$1.path`" + test -z "$browser_path" && browser_path="$1" +} + start_httpd url=http://127.0.0.1:$port -test -n "$browser" && "$browser" $url || echo $url +test -n "$browser" && { + init_browser_path "$browser" + "$browser_path" $url +} || echo $url |