man-pages/man1/git-web--browse.1.html
2021-03-31 01:06:50 +01:00

314 lines
5.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of GIT-WEB--BROWSE</TITLE>
</HEAD><BODY>
<H1>GIT-WEB--BROWSE</H1>
Section: Git Manual (1)<BR>Updated: 03/04/2021<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
git-web--browse - Git helper script to launch a web browser
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<PRE>
<I>git web--browse</I> [&lt;options&gt;] &lt;url|file&gt;...
</PRE>
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
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.
<P>
The following browsers (or commands) are currently supported:
<P>
<DL COMPACT><DT id="1"><DD>
&bull;
firefox (this is the default under X Window when not using KDE)
</DL>
<P>
<DL COMPACT><DT id="2"><DD>
&bull;
iceweasel
</DL>
<P>
<DL COMPACT><DT id="3"><DD>
&bull;
seamonkey
</DL>
<P>
<DL COMPACT><DT id="4"><DD>
&bull;
iceape
</DL>
<P>
<DL COMPACT><DT id="5"><DD>
&bull;
chromium (also supported as chromium-browser)
</DL>
<P>
<DL COMPACT><DT id="6"><DD>
&bull;
google-chrome (also supported as chrome)
</DL>
<P>
<DL COMPACT><DT id="7"><DD>
&bull;
konqueror (this is the default under KDE, see
<I>Note about konqueror</I>
below)
</DL>
<P>
<DL COMPACT><DT id="8"><DD>
&bull;
opera
</DL>
<P>
<DL COMPACT><DT id="9"><DD>
&bull;
w3m (this is the default outside graphical environments)
</DL>
<P>
<DL COMPACT><DT id="10"><DD>
&bull;
elinks
</DL>
<P>
<DL COMPACT><DT id="11"><DD>
&bull;
links
</DL>
<P>
<DL COMPACT><DT id="12"><DD>
&bull;
lynx
</DL>
<P>
<DL COMPACT><DT id="13"><DD>
&bull;
dillo
</DL>
<P>
<DL COMPACT><DT id="14"><DD>
&bull;
open (this is the default under Mac OS X GUI)
</DL>
<P>
<DL COMPACT><DT id="15"><DD>
&bull;
start (this is the default under MinGW)
</DL>
<P>
<DL COMPACT><DT id="16"><DD>
&bull;
cygstart (this is the default under Cygwin)
</DL>
<P>
<DL COMPACT><DT id="17"><DD>
&bull;
xdg-open
</DL>
<P>
Custom commands may also be specified.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<P>
-b &lt;browser&gt;, --browser=&lt;browser&gt;
<DL COMPACT><DT id="18"><DD>
Use the specified browser. It must be in the list of supported browsers.
</DL>
<P>
-t &lt;browser&gt;, --tool=&lt;browser&gt;
<DL COMPACT><DT id="19"><DD>
Same as above.
</DL>
<P>
-c &lt;conf.var&gt;, --config=&lt;conf.var&gt;
<DL COMPACT><DT id="20"><DD>
CONF.VAR is looked up in the Git config files. If it's set, then its value specifies the browser that should be used.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>CONFIGURATION VARIABLES</H2>
<A NAME="lbAG">&nbsp;</A>
<H3>CONF.VAR (from -c option) and web.browser</H3>
<P>
The web browser can be specified using a configuration variable passed with the -c (or --config) command-line option, or the <B>web.browser</B> configuration variable if the former is not used.
<A NAME="lbAH">&nbsp;</A>
<H3>browser.&lt;tool&gt;.path</H3>
<P>
You can explicitly provide a full path to your preferred browser by setting the configuration variable <B>browser.&lt;tool&gt;.path</B>. For example, you can configure the absolute path to firefox by setting <I>browser.firefox.path</I>. Otherwise, <I>git web--browse</I> assumes the tool is available in PATH.
<A NAME="lbAI">&nbsp;</A>
<H3>browser.&lt;tool&gt;.cmd</H3>
<P>
When the browser, specified by options or configuration variables, is not among the supported ones, then the corresponding <B>browser.&lt;tool&gt;.cmd</B> configuration variable will be looked up. If this variable exists then <I>git web--browse</I> will treat the specified tool as a custom command and will use a shell eval to run the command with the URLs passed as arguments.
<A NAME="lbAJ">&nbsp;</A>
<H2>NOTE ABOUT KONQUEROR</H2>
<P>
When <I>konqueror</I> is specified by a command-line option or a configuration variable, we launch <I>kfmclient</I> to try to open the HTML man page on an already opened konqueror in a new tab if possible.
<P>
For consistency, we also try such a trick if <I>browser.konqueror.path</I> is set to something like <B>A_PATH_TO/konqueror</B>. That means we will try to launch <B>A_PATH_TO/kfmclient</B> instead.
<P>
If you really want to use <I>konqueror</I>, then you can use something like the following:
<P>
<DL COMPACT><DT id="21"><DD>
<PRE>
[web]
browser = konq
[browser &quot;konq&quot;]
cmd = A_PATH_TO/konqueror
</PRE>
</DL>
<P>
<A NAME="lbAK">&nbsp;</A>
<H3>Note about git-config --global</H3>
<P>
Note that these configuration variables should probably be set using the <B>--global</B> flag, for example like this:
<P>
<DL COMPACT><DT id="22"><DD>
<PRE>
$ git config --global web.browser firefox
</PRE>
</DL>
<P>
<P>
as they are probably more user specific than repository specific. See <B><A HREF="/cgi-bin/man/man2html?1+git-config">git-config</A></B>(1) for more information about this.
<A NAME="lbAL">&nbsp;</A>
<H2>GIT</H2>
<P>
Part of the <B><A HREF="/cgi-bin/man/man2html?1+git">git</A></B>(1) suite
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="23"><A HREF="#lbAB">NAME</A><DD>
<DT id="24"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="25"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="26"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="27"><A HREF="#lbAF">CONFIGURATION VARIABLES</A><DD>
<DL>
<DT id="28"><A HREF="#lbAG">CONF.VAR (from -c option) and web.browser</A><DD>
<DT id="29"><A HREF="#lbAH">browser.&lt;tool&gt;.path</A><DD>
<DT id="30"><A HREF="#lbAI">browser.&lt;tool&gt;.cmd</A><DD>
</DL>
<DT id="31"><A HREF="#lbAJ">NOTE ABOUT KONQUEROR</A><DD>
<DL>
<DT id="32"><A HREF="#lbAK">Note about git-config --global</A><DD>
</DL>
<DT id="33"><A HREF="#lbAL">GIT</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:15 GMT, March 31, 2021
</BODY>
</HTML>