blob: f2f996cbe169f0964e50dc70ea2f2acef8f51d99 [file] [log] [blame]
Junio C Hamano2db3e752010-09-03 21:33:061git-web{litdd}browse(1)
2=======================
Junio C Hamano26e590a2008-02-17 03:53:513
4NAME
5----
Junio C Hamano076ffcc2013-02-06 05:13:216git-web--browse - Git helper script to launch a web browser
Junio C Hamano26e590a2008-02-17 03:53:517
8SYNOPSIS
9--------
Junio C Hamano15567bc2011-07-23 00:51:5910[verse]
Junio C Hamano59a32b02021-12-10 22:53:3811'git web{litdd}browse' [<options>] (<URL>|<file>)...
Junio C Hamano26e590a2008-02-17 03:53:5112
13DESCRIPTION
14-----------
15
16This script tries, as much as possible, to display the URLs and FILEs
17that are passed as arguments, as HTML pages in new tabs on an already
18opened web browser.
19
20The following browsers (or commands) are currently supported:
21
22* firefox (this is the default under X Window when not using KDE)
23* iceweasel
Junio C Hamanoeef01fe2010-12-13 08:31:5824* seamonkey
25* iceape
26* chromium (also supported as chromium-browser)
27* google-chrome (also supported as chrome)
Junio C Hamano6d76d612008-05-09 05:46:0828* konqueror (this is the default under KDE, see 'Note about konqueror' below)
Junio C Hamanoeef01fe2010-12-13 08:31:5829* opera
Junio C Hamano26e590a2008-02-17 03:53:5130* w3m (this is the default outside graphical environments)
Junio C Hamanoeef01fe2010-12-13 08:31:5831* elinks
Junio C Hamano26e590a2008-02-17 03:53:5132* links
33* lynx
34* dillo
35* open (this is the default under Mac OS X GUI)
Junio C Hamanoa476efa2008-10-10 15:31:4236* start (this is the default under MinGW)
Junio C Hamano3a3357e2013-06-26 23:20:5637* cygstart (this is the default under Cygwin)
Junio C Hamanoc5e40782013-11-01 16:52:2638* xdg-open
Junio C Hamano26e590a2008-02-17 03:53:5139
Junio C Hamano8760ea62008-03-14 08:58:4540Custom commands may also be specified.
41
Junio C Hamano26e590a2008-02-17 03:53:5142OPTIONS
43-------
Junio C Hamanod2179ef2010-10-22 04:12:1744-b <browser>::
45--browser=<browser>::
46Use the specified browser. It must be in the list of supported
Junio C Hamano26e590a2008-02-17 03:53:5147browsers.
48
Junio C Hamanod2179ef2010-10-22 04:12:1749-t <browser>::
50--tool=<browser>::
Junio C Hamano26e590a2008-02-17 03:53:5151Same as above.
52
Junio C Hamanod2179ef2010-10-22 04:12:1753-c <conf.var>::
54--config=<conf.var>::
Junio C Hamano076ffcc2013-02-06 05:13:2155CONF.VAR is looked up in the Git config files. If it's set,
Junio C Hamanod2179ef2010-10-22 04:12:1756then its value specifies the browser that should be used.
Junio C Hamano26e590a2008-02-17 03:53:5157
58CONFIGURATION VARIABLES
59-----------------------
60
Junio C Hamano8760ea62008-03-14 08:58:4561CONF.VAR (from -c option) and web.browser
62~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63
Junio C Hamano26e590a2008-02-17 03:53:5164The web browser can be specified using a configuration variable passed
Junio C Hamano042f2142016-06-27 18:05:0565with the -c (or --config) command-line option, or the `web.browser`
Junio C Hamano26e590a2008-02-17 03:53:5166configuration variable if the former is not used.
67
Junio C Hamano8760ea62008-03-14 08:58:4568browser.<tool>.path
69~~~~~~~~~~~~~~~~~~~
70
Junio C Hamano26e590a2008-02-17 03:53:5171You can explicitly provide a full path to your preferred browser by
Junio C Hamano042f2142016-06-27 18:05:0572setting the configuration variable `browser.<tool>.path`. For example,
Junio C Hamano26e590a2008-02-17 03:53:5173you can configure the absolute path to firefox by setting
Junio C Hamano360e3a12011-07-13 23:51:5674'browser.firefox.path'. Otherwise, 'git web{litdd}browse' assumes the tool
Junio C Hamano26e590a2008-02-17 03:53:5175is available in PATH.
76
Junio C Hamano8760ea62008-03-14 08:58:4577browser.<tool>.cmd
78~~~~~~~~~~~~~~~~~~
79
80When the browser, specified by options or configuration variables, is
81not among the supported ones, then the corresponding
Junio C Hamano042f2142016-06-27 18:05:0582`browser.<tool>.cmd` configuration variable will be looked up. If this
Junio C Hamano2db3e752010-09-03 21:33:0683variable exists then 'git web{litdd}browse' will treat the specified tool
Junio C Hamano8760ea62008-03-14 08:58:4584as a custom command and will use a shell eval to run the command with
85the URLs passed as arguments.
86
Junio C Hamanob9d9d902018-05-23 07:07:4287NOTE ABOUT KONQUEROR
Junio C Hamano6d76d612008-05-09 05:46:0888--------------------
89
Junio C Hamanoe1aeb5e2014-06-06 19:16:2990When 'konqueror' is specified by a command-line option or a
Junio C Hamano6d76d612008-05-09 05:46:0891configuration variable, we launch 'kfmclient' to try to open the HTML
92man page on an already opened konqueror in a new tab if possible.
93
Junio C Hamano0f7b5a92008-05-17 06:12:2394For consistency, we also try such a trick if 'browser.konqueror.path' is
Junio C Hamanob5513772019-04-22 03:38:3995set to something like `A_PATH_TO/konqueror`. That means we will try to
96launch `A_PATH_TO/kfmclient` instead.
Junio C Hamano6d76d612008-05-09 05:46:0897
98If you really want to use 'konqueror', then you can use something like
99the following:
100
101------------------------------------------------
102[web]
103browser = konq
104
105[browser "konq"]
106cmd = A_PATH_TO/konqueror
107------------------------------------------------
108
Junio C Hamanofce7c7e2008-07-02 03:06:38109Note about git-config --global
Junio C Hamano8760ea62008-03-14 08:58:45110~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111
Junio C Hamano26e590a2008-02-17 03:53:51112Note that these configuration variables should probably be set using
Junio C Hamano92d80372016-07-13 22:00:05113the `--global` flag, for example like this:
Junio C Hamano26e590a2008-02-17 03:53:51114
115------------------------------------------------
116$ git config --global web.browser firefox
117------------------------------------------------
118
119as they are probably more user specific than repository specific.
120See linkgit:git-config[1] for more information about this.
121
Junio C Hamano26e590a2008-02-17 03:53:51122GIT
123---
Junio C Hamanof7c042d2008-06-06 22:50:53124Part of the linkgit:git[1] suite