2010-08-23 21:20:25 +00:00
|
|
|
git-web{litdd}browse(1)
|
|
|
|
=======================
|
2008-02-14 07:01:23 +00:00
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2013-01-21 19:17:53 +00:00
|
|
|
git-web--browse - Git helper script to launch a web browser
|
2008-02-14 07:01:23 +00:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2011-07-02 02:38:26 +00:00
|
|
|
[verse]
|
2018-05-24 20:11:39 +00:00
|
|
|
'git web{litdd}browse' [<options>] <url|file>...
|
2008-02-14 07:01:23 +00:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
|
|
|
|
This script tries, as much as possible, to display the URLs and FILEs
|
|
|
|
that are passed as arguments, as HTML pages in new tabs on an already
|
|
|
|
opened web browser.
|
|
|
|
|
|
|
|
The following browsers (or commands) are currently supported:
|
|
|
|
|
|
|
|
* firefox (this is the default under X Window when not using KDE)
|
|
|
|
* iceweasel
|
2010-12-03 16:47:38 +00:00
|
|
|
* seamonkey
|
|
|
|
* iceape
|
2010-12-03 16:47:39 +00:00
|
|
|
* chromium (also supported as chromium-browser)
|
|
|
|
* google-chrome (also supported as chrome)
|
2008-04-25 06:25:41 +00:00
|
|
|
* konqueror (this is the default under KDE, see 'Note about konqueror' below)
|
2010-12-03 16:47:38 +00:00
|
|
|
* opera
|
2008-02-14 07:01:23 +00:00
|
|
|
* w3m (this is the default outside graphical environments)
|
2010-12-03 16:47:38 +00:00
|
|
|
* elinks
|
2008-02-14 07:01:23 +00:00
|
|
|
* links
|
|
|
|
* lynx
|
|
|
|
* dillo
|
|
|
|
* open (this is the default under Mac OS X GUI)
|
2008-09-24 21:52:39 +00:00
|
|
|
* start (this is the default under MinGW)
|
2013-06-21 07:24:32 +00:00
|
|
|
* cygstart (this is the default under Cygwin)
|
2013-10-26 17:43:54 +00:00
|
|
|
* xdg-open
|
2008-02-14 07:01:23 +00:00
|
|
|
|
2008-03-14 04:56:53 +00:00
|
|
|
Custom commands may also be specified.
|
|
|
|
|
2008-02-14 07:01:23 +00:00
|
|
|
OPTIONS
|
|
|
|
-------
|
2010-10-08 17:31:15 +00:00
|
|
|
-b <browser>::
|
|
|
|
--browser=<browser>::
|
|
|
|
Use the specified browser. It must be in the list of supported
|
2008-02-14 07:01:23 +00:00
|
|
|
browsers.
|
|
|
|
|
2010-10-08 17:31:15 +00:00
|
|
|
-t <browser>::
|
|
|
|
--tool=<browser>::
|
2008-02-14 07:01:23 +00:00
|
|
|
Same as above.
|
|
|
|
|
2010-10-08 17:31:15 +00:00
|
|
|
-c <conf.var>::
|
|
|
|
--config=<conf.var>::
|
2013-01-21 19:17:53 +00:00
|
|
|
CONF.VAR is looked up in the Git config files. If it's set,
|
2010-10-08 17:31:15 +00:00
|
|
|
then its value specifies the browser that should be used.
|
2008-02-14 07:01:23 +00:00
|
|
|
|
|
|
|
CONFIGURATION VARIABLES
|
|
|
|
-----------------------
|
|
|
|
|
2008-03-14 04:56:53 +00:00
|
|
|
CONF.VAR (from -c option) and web.browser
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2008-02-14 07:01:23 +00:00
|
|
|
The web browser can be specified using a configuration variable passed
|
2016-06-08 17:23:16 +00:00
|
|
|
with the -c (or --config) command-line option, or the `web.browser`
|
2008-02-14 07:01:23 +00:00
|
|
|
configuration variable if the former is not used.
|
|
|
|
|
2008-03-14 04:56:53 +00:00
|
|
|
browser.<tool>.path
|
|
|
|
~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2008-02-14 07:01:23 +00:00
|
|
|
You can explicitly provide a full path to your preferred browser by
|
2016-06-08 17:23:16 +00:00
|
|
|
setting the configuration variable `browser.<tool>.path`. For example,
|
2008-02-14 07:01:23 +00:00
|
|
|
you can configure the absolute path to firefox by setting
|
Documentation: quote double-dash for AsciiDoc
AsciiDoc versions since 5.0.6 treat a double-dash surrounded by spaces
(outside of verbatim environments) as a request to insert an em dash.
Such versions also treat the three-character sequence "\--", when not
followed by another dash, as a request to insert two literal minus
signs. Thus from time to time there have been patches to add
backslashes to AsciiDoc markup to escape double-dashes that are meant
to be represent '--' characters used literally on the command line;
see v1.4.0-rc1~174, Fix up docs where "--" isn't displayed correctly,
2006-05-05, for example.
AsciiDoc 6.0.3 (2005-04-20) made life harder by also treating
double-dashes without surrounding whitespace as markup for an em dash,
though only when formatting for backends other than the manpages
(e.g., HTML). Many pages needed to be changed to use a backslash
before the "--" in names of command-line flags like "--add" (see
v0.99.6~37, Update tutorial, 2005-08-30).
AsciiDoc 8.3.0 (2008-11-29) refined the em-dash rule to avoid that
requirement. Double-dashes without surrounding spaces are not
rendered as em dashes any more unless bordered on both sides by
alphanumeric characters. The unescaped markup for option names (e.g.,
"--add") works fine, and many instances of this style have leaked into
Documentation/; git's HTML documentation contains many spurious em
dashes when formatted by an older toolchain. (This patch will not
change that.)
The upshot: "--" as an isolated word and in phrases like "git
web--browse" must be escaped if it is not to be rendered as an em dash
by current asciidoc. Use "\--" to avoid such misformatting in
sentences in which "--" represents a literal double-minus command line
argument that separates options and revs from pathspecs, and use
"{litdd}" in cases where the double-dash is embedded in the command
name. The latter is just for consistency with v1.7.3-rc0~13^2 (Work
around em-dash handling in newer AsciiDoc, 2010-08-23).
List of lines to fix found by grepping manpages for "(em".
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Improved-by: Junio C Hamano <gitster@pobox.com>
Improved-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-29 05:35:10 +00:00
|
|
|
'browser.firefox.path'. Otherwise, 'git web{litdd}browse' assumes the tool
|
2008-02-14 07:01:23 +00:00
|
|
|
is available in PATH.
|
|
|
|
|
2008-03-14 04:56:53 +00:00
|
|
|
browser.<tool>.cmd
|
|
|
|
~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
When the browser, specified by options or configuration variables, is
|
|
|
|
not among the supported ones, then the corresponding
|
2016-06-08 17:23:16 +00:00
|
|
|
`browser.<tool>.cmd` configuration variable will be looked up. If this
|
2010-08-23 21:20:25 +00:00
|
|
|
variable exists then 'git web{litdd}browse' will treat the specified tool
|
2008-03-14 04:56:53 +00:00
|
|
|
as a custom command and will use a shell eval to run the command with
|
|
|
|
the URLs passed as arguments.
|
|
|
|
|
2018-04-30 15:35:33 +00:00
|
|
|
NOTE ABOUT KONQUEROR
|
2008-04-25 06:25:41 +00:00
|
|
|
--------------------
|
|
|
|
|
2014-05-21 18:52:26 +00:00
|
|
|
When 'konqueror' is specified by a command-line option or a
|
2008-04-25 06:25:41 +00:00
|
|
|
configuration variable, we launch 'kfmclient' to try to open the HTML
|
|
|
|
man page on an already opened konqueror in a new tab if possible.
|
|
|
|
|
2008-05-15 17:52:22 +00:00
|
|
|
For consistency, we also try such a trick if 'browser.konqueror.path' is
|
2008-04-25 06:25:41 +00:00
|
|
|
set to something like 'A_PATH_TO/konqueror'. That means we will try to
|
|
|
|
launch 'A_PATH_TO/kfmclient' instead.
|
|
|
|
|
|
|
|
If you really want to use 'konqueror', then you can use something like
|
|
|
|
the following:
|
|
|
|
|
|
|
|
------------------------------------------------
|
|
|
|
[web]
|
|
|
|
browser = konq
|
|
|
|
|
|
|
|
[browser "konq"]
|
|
|
|
cmd = A_PATH_TO/konqueror
|
|
|
|
------------------------------------------------
|
|
|
|
|
2008-06-30 06:09:04 +00:00
|
|
|
Note about git-config --global
|
2008-03-14 04:56:53 +00:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2008-02-14 07:01:23 +00:00
|
|
|
Note that these configuration variables should probably be set using
|
2016-06-28 11:40:11 +00:00
|
|
|
the `--global` flag, for example like this:
|
2008-02-14 07:01:23 +00:00
|
|
|
|
|
|
|
------------------------------------------------
|
|
|
|
$ git config --global web.browser firefox
|
|
|
|
------------------------------------------------
|
|
|
|
|
|
|
|
as they are probably more user specific than repository specific.
|
|
|
|
See linkgit:git-config[1] for more information about this.
|
|
|
|
|
|
|
|
GIT
|
|
|
|
---
|
2008-06-06 07:07:32 +00:00
|
|
|
Part of the linkgit:git[1] suite
|