Skip to content

Commit

Permalink
git-web--browse: Support for using /bin/start on MinGW
Browse files Browse the repository at this point in the history
In the future, I think we should also default to xdg-open on Linux instead
of having a KDE-specific hack.

This patch has been sponsored by Novartis.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Petr Baudis authored and Shawn O. Pearce committed Sep 24, 2008
1 parent e2b850b commit 3b9b116
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions Documentation/git-web--browse.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ The following browsers (or commands) are currently supported:
* lynx
* dillo
* open (this is the default under Mac OS X GUI)
* start (this is the default under MinGW)

Custom commands may also be specified.

Expand Down
8 changes: 6 additions & 2 deletions git-web--browse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ valid_custom_tool()

valid_tool() {
case "$1" in
firefox | iceweasel | konqueror | w3m | links | lynx | dillo | open)
firefox | iceweasel | konqueror | w3m | links | lynx | dillo | open | start)
;; # happy
*)
valid_custom_tool "$1" || return 1
Expand Down Expand Up @@ -114,6 +114,10 @@ if test -z "$browser" ; then
if test -n "$SECURITYSESSIONID"; then
browser_candidates="open $browser_candidates"
fi
# /bin/start indicates MinGW
if test -n /bin/start; then
browser_candidates="start $browser_candidates"
fi

for i in $browser_candidates; do
init_browser_path $i
Expand Down Expand Up @@ -157,7 +161,7 @@ case "$browser" in
;;
esac
;;
w3m|links|lynx|open)
w3m|links|lynx|open|start)
eval "$browser_path" "$@"
;;
dillo)
Expand Down

0 comments on commit 3b9b116

Please sign in to comment.