Skip to content

Commit 1658c61

Browse files
chriscoolgitster
authored andcommitted
Documention: web--browse: add info about "browser.<tool>.cmd" config var
Signed-off-by: Christian Couder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 77e2153 commit 1658c61

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

Documentation/config.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,11 @@ branch.<name>.rebase::
420420
it unless you understand the implications (see linkgit:git-rebase[1]
421421
for details).
422422

423+
browser.<tool>.cmd::
424+
Specify the command to invoke the specified browser. The
425+
specified command is evaluated in shell with the URLs passed
426+
as arguments. (See linkgit:git-web--browse[1].)
427+
423428
browser.<tool>.path::
424429
Override the path for the given tool that may be used to
425430
browse HTML help (see '-w' option in linkgit:git-help[1]) or a

Documentation/git-web--browse.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ The following browsers (or commands) are currently supported:
2727
* dillo
2828
* open (this is the default under Mac OS X GUI)
2929

30+
Custom commands may also be specified.
31+
3032
OPTIONS
3133
-------
3234
-b BROWSER|--browser=BROWSER::
@@ -43,16 +45,35 @@ OPTIONS
4345
CONFIGURATION VARIABLES
4446
-----------------------
4547

48+
CONF.VAR (from -c option) and web.browser
49+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50+
4651
The web browser can be specified using a configuration variable passed
4752
with the -c (or --config) command line option, or the 'web.browser'
4853
configuration variable if the former is not used.
4954

55+
browser.<tool>.path
56+
~~~~~~~~~~~~~~~~~~~
57+
5058
You can explicitly provide a full path to your preferred browser by
5159
setting the configuration variable 'browser.<tool>.path'. For example,
5260
you can configure the absolute path to firefox by setting
5361
'browser.firefox.path'. Otherwise, 'git-web--browse' assumes the tool
5462
is available in PATH.
5563

64+
browser.<tool>.cmd
65+
~~~~~~~~~~~~~~~~~~
66+
67+
When the browser, specified by options or configuration variables, is
68+
not among the supported ones, then the corresponding
69+
'browser.<tool>.cmd' configuration variable will be looked up. If this
70+
variable exists then "git web--browse" will treat the specified tool
71+
as a custom command and will use a shell eval to run the command with
72+
the URLs passed as arguments.
73+
74+
Note about git config --global
75+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
76+
5677
Note that these configuration variables should probably be set using
5778
the '--global' flag, for example like this:
5879

0 commit comments

Comments
 (0)