2010-08-23 23:20:25 +02:00
|
|
|
git-web{litdd}browse(1)
|
|
|
|
=======================
|
2008-02-14 08:01:23 +01:00
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2013-01-21 20:17:53 +01:00
|
|
|
git-web--browse - Git helper script to launch a web browser
|
2008-02-14 08:01:23 +01:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2011-07-02 04:38:26 +02:00
|
|
|
[verse]
|
2021-10-28 18:21:57 +02:00
|
|
|
'git web{litdd}browse' [<options>] (<URL>|<file>)...
|
2008-02-14 08:01:23 +01: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 17:47:38 +01:00
|
|
|
* seamonkey
|
|
|
|
* iceape
|
2010-12-03 17:47:39 +01:00
|
|
|
* chromium (also supported as chromium-browser)
|
|
|
|
* google-chrome (also supported as chrome)
|
2008-04-25 08:25:41 +02:00
|
|
|
* konqueror (this is the default under KDE, see 'Note about konqueror' below)
|
2010-12-03 17:47:38 +01:00
|
|
|
* opera
|
2008-02-14 08:01:23 +01:00
|
|
|
* w3m (this is the default outside graphical environments)
|
2010-12-03 17:47:38 +01:00
|
|
|
* elinks
|
2008-02-14 08:01:23 +01:00
|
|
|
* links
|
|
|
|
* lynx
|
|
|
|
* dillo
|
|
|
|
* open (this is the default under Mac OS X GUI)
|
2008-09-24 23:52:39 +02:00
|
|
|
* start (this is the default under MinGW)
|
2013-06-21 09:24:32 +02:00
|
|
|
* cygstart (this is the default under Cygwin)
|
2013-10-26 19:43:54 +02:00
|
|
|
* xdg-open
|
2008-02-14 08:01:23 +01:00
|
|
|
|
2008-03-14 05:56:53 +01:00
|
|
|
Custom commands may also be specified.
|
|
|
|
|
2008-02-14 08:01:23 +01:00
|
|
|
OPTIONS
|
|
|
|
-------
|
2010-10-08 19:31:15 +02:00
|
|
|
-b <browser>::
|
|
|
|
--browser=<browser>::
|
|
|
|
Use the specified browser. It must be in the list of supported
|
2008-02-14 08:01:23 +01:00
|
|
|
browsers.
|
|
|
|
|
2010-10-08 19:31:15 +02:00
|
|
|
-t <browser>::
|
|
|
|
--tool=<browser>::
|
2008-02-14 08:01:23 +01:00
|
|
|
Same as above.
|
|
|
|
|
2010-10-08 19:31:15 +02:00
|
|
|
-c <conf.var>::
|
|
|
|
--config=<conf.var>::
|
2013-01-21 20:17:53 +01:00
|
|
|
CONF.VAR is looked up in the Git config files. If it's set,
|
2010-10-08 19:31:15 +02:00
|
|
|
then its value specifies the browser that should be used.
|
2008-02-14 08:01:23 +01:00
|
|
|
|
|
|
|
CONFIGURATION VARIABLES
|
|
|
|
-----------------------
|
|
|
|
|
2008-03-14 05:56:53 +01:00
|
|
|
CONF.VAR (from -c option) and web.browser
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2008-02-14 08:01:23 +01:00
|
|
|
The web browser can be specified using a configuration variable passed
|
2016-06-08 19:23:16 +02:00
|
|
|
with the -c (or --config) command-line option, or the `web.browser`
|
2008-02-14 08:01:23 +01:00
|
|
|
configuration variable if the former is not used.
|
|
|
|
|
2008-03-14 05:56:53 +01:00
|
|
|
browser.<tool>.path
|
|
|
|
~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2008-02-14 08:01:23 +01:00
|
|
|
You can explicitly provide a full path to your preferred browser by
|
2016-06-08 19:23:16 +02:00
|
|
|
setting the configuration variable `browser.<tool>.path`. For example,
|
2008-02-14 08:01:23 +01: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 07:35:10 +02:00
|
|
|
'browser.firefox.path'. Otherwise, 'git web{litdd}browse' assumes the tool
|
2008-02-14 08:01:23 +01:00
|
|
|
is available in PATH.
|
|
|
|
|
2008-03-14 05:56:53 +01: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 19:23:16 +02:00
|
|
|
`browser.<tool>.cmd` configuration variable will be looked up. If this
|
2010-08-23 23:20:25 +02:00
|
|
|
variable exists then 'git web{litdd}browse' will treat the specified tool
|
2008-03-14 05:56:53 +01:00
|
|
|
as a custom command and will use a shell eval to run the command with
|
|
|
|
the URLs passed as arguments.
|
|
|
|
|
2018-04-30 17:35:33 +02:00
|
|
|
NOTE ABOUT KONQUEROR
|
2008-04-25 08:25:41 +02:00
|
|
|
--------------------
|
|
|
|
|
2014-05-21 20:52:26 +02:00
|
|
|
When 'konqueror' is specified by a command-line option or a
|
2008-04-25 08:25:41 +02: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 19:52:22 +02:00
|
|
|
For consistency, we also try such a trick if 'browser.konqueror.path' is
|
2019-03-06 14:04:46 +01:00
|
|
|
set to something like `A_PATH_TO/konqueror`. That means we will try to
|
|
|
|
launch `A_PATH_TO/kfmclient` instead.
|
2008-04-25 08:25:41 +02:00
|
|
|
|
|
|
|
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 08:09:04 +02:00
|
|
|
Note about git-config --global
|
2008-03-14 05:56:53 +01:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2008-02-14 08:01:23 +01:00
|
|
|
Note that these configuration variables should probably be set using
|
2016-06-28 13:40:11 +02:00
|
|
|
the `--global` flag, for example like this:
|
2008-02-14 08:01:23 +01: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 09:07:32 +02:00
|
|
|
Part of the linkgit:git[1] suite
|