Documentation / git-web--browse.txton commit Documentation: convert tutorials to man pages (b27a23e)
   1git-web--browse(1)
   2==================
   3
   4NAME
   5----
   6git-web--browse - git helper script to launch a web browser
   7
   8SYNOPSIS
   9--------
  10'git-web--browse' [OPTIONS] URL/FILE ...
  11
  12DESCRIPTION
  13-----------
  14
  15This script tries, as much as possible, to display the URLs and FILEs
  16that are passed as arguments, as HTML pages in new tabs on an already
  17opened web browser.
  18
  19The following browsers (or commands) are currently supported:
  20
  21* firefox (this is the default under X Window when not using KDE)
  22* iceweasel
  23* konqueror (this is the default under KDE, see 'Note about konqueror' below)
  24* w3m (this is the default outside graphical environments)
  25* links
  26* lynx
  27* dillo
  28* open (this is the default under Mac OS X GUI)
  29
  30Custom commands may also be specified.
  31
  32OPTIONS
  33-------
  34-b BROWSER|--browser=BROWSER::
  35        Use the specified BROWSER. It must be in the list of supported
  36        browsers.
  37
  38-t BROWSER|--tool=BROWSER::
  39        Same as above.
  40
  41-c CONF.VAR|--config=CONF.VAR::
  42        CONF.VAR is looked up in the git config files. If it's set,
  43        then its value specify the browser that should be used.
  44
  45CONFIGURATION VARIABLES
  46-----------------------
  47
  48CONF.VAR (from -c option) and web.browser
  49~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  50
  51The web browser can be specified using a configuration variable passed
  52with the -c (or --config) command line option, or the 'web.browser'
  53configuration variable if the former is not used.
  54
  55browser.<tool>.path
  56~~~~~~~~~~~~~~~~~~~
  57
  58You can explicitly provide a full path to your preferred browser by
  59setting the configuration variable 'browser.<tool>.path'. For example,
  60you can configure the absolute path to firefox by setting
  61'browser.firefox.path'. Otherwise, 'git-web--browse' assumes the tool
  62is available in PATH.
  63
  64browser.<tool>.cmd
  65~~~~~~~~~~~~~~~~~~
  66
  67When the browser, specified by options or configuration variables, is
  68not among the supported ones, then the corresponding
  69'browser.<tool>.cmd' configuration variable will be looked up. If this
  70variable exists then "git web--browse" will treat the specified tool
  71as a custom command and will use a shell eval to run the command with
  72the URLs passed as arguments.
  73
  74Note about konqueror
  75--------------------
  76
  77When 'konqueror' is specified by the a command line option or a
  78configuration variable, we launch 'kfmclient' to try to open the HTML
  79man page on an already opened konqueror in a new tab if possible.
  80
  81For consistency, we also try such a trick if 'browser.konqueror.path' is
  82set to something like 'A_PATH_TO/konqueror'. That means we will try to
  83launch 'A_PATH_TO/kfmclient' instead.
  84
  85If you really want to use 'konqueror', then you can use something like
  86the following:
  87
  88------------------------------------------------
  89        [web]
  90                browser = konq
  91
  92        [browser "konq"]
  93                cmd = A_PATH_TO/konqueror
  94------------------------------------------------
  95
  96Note about git config --global
  97~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  98
  99Note that these configuration variables should probably be set using
 100the '--global' flag, for example like this:
 101
 102------------------------------------------------
 103$ git config --global web.browser firefox
 104------------------------------------------------
 105
 106as they are probably more user specific than repository specific.
 107See linkgit:git-config[1] for more information about this.
 108
 109Author
 110------
 111Written by Christian Couder <chriscool@tuxfamily.org> and the git-list
 112<git@vger.kernel.org>, based on git-mergetool by Theodore Y. Ts'o.
 113
 114Documentation
 115-------------
 116Documentation by Christian Couder <chriscool@tuxfamily.org> and the
 117git-list <git@vger.kernel.org>.
 118
 119GIT
 120---
 121Part of the linkgit:git[7] suite