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