diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/git/git-web--browse.html | |
new repository
Diffstat (limited to 'devdocs/git/git-web--browse.html')
| -rw-r--r-- | devdocs/git/git-web--browse.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/devdocs/git/git-web--browse.html b/devdocs/git/git-web--browse.html new file mode 100644 index 00000000..819075e6 --- /dev/null +++ b/devdocs/git/git-web--browse.html @@ -0,0 +1,14 @@ +<h1>git-web--browse</h1> <h2 id="_name">Name</h2> <div class="sectionbody"> <p>git-web—browse - Git helper script to launch a web browser</p> </div> <h2 id="_synopsis">Synopsis</h2> <div class="sectionbody"> <div class="verseblock"> <pre class="content" data-language="shell">git web--browse [<options>] (<URL>|<file>)…</pre> </div> </div> <h2 id="_description">Description</h2> <div class="sectionbody"> <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> <p>The following browsers (or commands) are currently supported:</p> <div class="ulist"> <ul> <li> <p>firefox (this is the default under X Window when not using KDE)</p> </li> <li> <p>iceweasel</p> </li> <li> <p>seamonkey</p> </li> <li> <p>iceape</p> </li> <li> <p>chromium (also supported as chromium-browser)</p> </li> <li> <p>google-chrome (also supported as chrome)</p> </li> <li> <p>konqueror (this is the default under KDE, see <code>Note about konqueror</code> below)</p> </li> <li> <p>opera</p> </li> <li> <p>w3m (this is the default outside graphical environments)</p> </li> <li> <p>elinks</p> </li> <li> <p>links</p> </li> <li> <p>lynx</p> </li> <li> <p>dillo</p> </li> <li> <p>open (this is the default under Mac OS X GUI)</p> </li> <li> <p>start (this is the default under MinGW)</p> </li> <li> <p>cygstart (this is the default under Cygwin)</p> </li> <li> <p>xdg-open</p> </li> </ul> </div> <p>Custom commands may also be specified.</p> </div> <h2 id="_options">Options</h2> <div class="sectionbody"> <div class="dlist"> <dl> <dt class="hdlist1" id="Documentation/git-web--browse.txt--bltbrowsergt"> -b <browser> </dt> <dt class="hdlist1" id="Documentation/git-web--browse.txt---browserltbrowsergt"> --browser=<browser> </dt> <dd> <p>Use the specified browser. It must be in the list of supported browsers.</p> </dd> <dt class="hdlist1" id="Documentation/git-web--browse.txt--tltbrowsergt"> -t <browser> </dt> <dt class="hdlist1" id="Documentation/git-web--browse.txt---toolltbrowsergt"> --tool=<browser> </dt> <dd> <p>Same as above.</p> </dd> <dt class="hdlist1" id="Documentation/git-web--browse.txt--cltconfvargt"> -c <conf.var> </dt> <dt class="hdlist1" id="Documentation/git-web--browse.txt---configltconfvargt"> --config=<conf.var> </dt> <dd> <p>CONF.VAR is looked up in the Git config files. If it’s set, then its value specifies the browser that should be used.</p> </dd> </dl> </div> </div> <h2 id="_configuration_variables">Configuration variables</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_conf_var_from_c_option_and_web_browser"> +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 <code>web.browser</code> configuration variable if the former is not used.</p> </div> <div class="sect2"> <h3 id="_browser_tool_path"> +browser.<tool>.path</h3> <p>You can explicitly provide a full path to your preferred browser by setting the configuration variable <code>browser.<tool>.path</code>. For example, you can configure the absolute path to firefox by setting <code>browser.firefox.path</code>. Otherwise, <code>git web--browse</code> assumes the tool is available in PATH.</p> </div> <div class="sect2"> <h3 id="_browser_tool_cmd"> +browser.<tool>.cmd</h3> <p>When the browser, specified by options or configuration variables, is not among the supported ones, then the corresponding <code>browser.<tool>.cmd</code> configuration variable will be looked up. If this variable exists then <code>git web--browse</code> 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.</p> </div> </div> <h2 id="_note_about_konqueror">Note about konqueror</h2> <div class="sectionbody"> <p>When <code>konqueror</code> is specified by a command-line option or a configuration variable, we launch <code>kfmclient</code> to try to open the HTML man page on an already opened konqueror in a new tab if possible.</p> <p>For consistency, we also try such a trick if <code>browser.konqueror.path</code> is set to something like <code>A_PATH_TO/konqueror</code>. That means we will try to launch <code>A_PATH_TO/kfmclient</code> instead.</p> <p>If you really want to use <code>konqueror</code>, then you can use something like the following:</p> <div class="listingblock"> <div class="content"> <pre> [web] + browser = konq + + [browser "konq"] + cmd = A_PATH_TO/konqueror</pre> </div> </div> <div class="sect2"> <h3 id="_note_about_git_config_global"> +Note about git-config --global</h3> <p>Note that these configuration variables should probably be set using the <code>--global</code> flag, for example like this:</p> <div class="listingblock"> <div class="content"> <pre data-language="shell-session">$ git config --global web.browser firefox</pre> </div> </div> <p>as they are probably more user specific than repository specific. See <a href="git-config">git-config[1]</a> for more information about this.</p> </div> </div><div class="_attribution"> + <p class="_attribution-p"> + © 2012–2024 Scott Chacon and others<br>Licensed under the MIT License.<br> + <a href="https://git-scm.com/docs/git-web--browse" class="_attribution-link">https://git-scm.com/docs/git-web--browse</a> + </p> +</div> |
