Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 1 | git-web{litdd}browse(1) |
| 2 | ======================= |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 3 | |
| 4 | NAME |
| 5 | ---- |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 6 | git-web--browse - Git helper script to launch a web browser |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 10 | [verse] |
Junio C Hamano | 59a32b0 | 2021-12-10 22:53:38 | [diff] [blame] | 11 | 'git web{litdd}browse' [<options>] (<URL>|<file>)... |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 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 |
Junio C Hamano | eef01fe | 2010-12-13 08:31:58 | [diff] [blame] | 24 | * seamonkey |
| 25 | * iceape |
| 26 | * chromium (also supported as chromium-browser) |
| 27 | * google-chrome (also supported as chrome) |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 28 | * konqueror (this is the default under KDE, see 'Note about konqueror' below) |
Junio C Hamano | eef01fe | 2010-12-13 08:31:58 | [diff] [blame] | 29 | * opera |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 30 | * w3m (this is the default outside graphical environments) |
Junio C Hamano | eef01fe | 2010-12-13 08:31:58 | [diff] [blame] | 31 | * elinks |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 32 | * links |
| 33 | * lynx |
| 34 | * dillo |
| 35 | * open (this is the default under Mac OS X GUI) |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 36 | * start (this is the default under MinGW) |
Junio C Hamano | 3a3357e | 2013-06-26 23:20:56 | [diff] [blame] | 37 | * cygstart (this is the default under Cygwin) |
Junio C Hamano | c5e4078 | 2013-11-01 16:52:26 | [diff] [blame] | 38 | * xdg-open |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 39 | |
Junio C Hamano | 8760ea6 | 2008-03-14 08:58:45 | [diff] [blame] | 40 | Custom commands may also be specified. |
| 41 | |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 42 | OPTIONS |
| 43 | ------- |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 44 | -b <browser>:: |
| 45 | --browser=<browser>:: |
| 46 | Use the specified browser. It must be in the list of supported |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 47 | browsers. |
| 48 | |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 49 | -t <browser>:: |
| 50 | --tool=<browser>:: |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 51 | Same as above. |
| 52 | |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 53 | -c <conf.var>:: |
| 54 | --config=<conf.var>:: |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 55 | CONF.VAR is looked up in the Git config files. If it's set, |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 56 | then its value specifies the browser that should be used. |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 57 | |
| 58 | CONFIGURATION VARIABLES |
| 59 | ----------------------- |
| 60 | |
Junio C Hamano | 8760ea6 | 2008-03-14 08:58:45 | [diff] [blame] | 61 | CONF.VAR (from -c option) and web.browser |
| 62 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 63 | |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 64 | The web browser can be specified using a configuration variable passed |
Junio C Hamano | 042f214 | 2016-06-27 18:05:05 | [diff] [blame] | 65 | with the -c (or --config) command-line option, or the `web.browser` |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 66 | configuration variable if the former is not used. |
| 67 | |
Junio C Hamano | 8760ea6 | 2008-03-14 08:58:45 | [diff] [blame] | 68 | browser.<tool>.path |
| 69 | ~~~~~~~~~~~~~~~~~~~ |
| 70 | |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 71 | You can explicitly provide a full path to your preferred browser by |
Junio C Hamano | 042f214 | 2016-06-27 18:05:05 | [diff] [blame] | 72 | setting the configuration variable `browser.<tool>.path`. For example, |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 73 | you can configure the absolute path to firefox by setting |
Junio C Hamano | 360e3a1 | 2011-07-13 23:51:56 | [diff] [blame] | 74 | 'browser.firefox.path'. Otherwise, 'git web{litdd}browse' assumes the tool |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 75 | is available in PATH. |
| 76 | |
Junio C Hamano | 8760ea6 | 2008-03-14 08:58:45 | [diff] [blame] | 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 |
Junio C Hamano | 042f214 | 2016-06-27 18:05:05 | [diff] [blame] | 82 | `browser.<tool>.cmd` configuration variable will be looked up. If this |
Junio C Hamano | 2db3e75 | 2010-09-03 21:33:06 | [diff] [blame] | 83 | variable exists then 'git web{litdd}browse' will treat the specified tool |
Junio C Hamano | 8760ea6 | 2008-03-14 08:58:45 | [diff] [blame] | 84 | as a custom command and will use a shell eval to run the command with |
| 85 | the URLs passed as arguments. |
| 86 | |
Junio C Hamano | b9d9d90 | 2018-05-23 07:07:42 | [diff] [blame] | 87 | NOTE ABOUT KONQUEROR |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 88 | -------------------- |
| 89 | |
Junio C Hamano | e1aeb5e | 2014-06-06 19:16:29 | [diff] [blame] | 90 | When 'konqueror' is specified by a command-line option or a |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 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 | |
Junio C Hamano | 0f7b5a9 | 2008-05-17 06:12:23 | [diff] [blame] | 94 | For consistency, we also try such a trick if 'browser.konqueror.path' is |
Junio C Hamano | b551377 | 2019-04-22 03:38:39 | [diff] [blame] | 95 | set to something like `A_PATH_TO/konqueror`. That means we will try to |
| 96 | launch `A_PATH_TO/kfmclient` instead. |
Junio C Hamano | 6d76d61 | 2008-05-09 05:46:08 | [diff] [blame] | 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 | |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 109 | Note about git-config --global |
Junio C Hamano | 8760ea6 | 2008-03-14 08:58:45 | [diff] [blame] | 110 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 111 | |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 112 | Note that these configuration variables should probably be set using |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 113 | the `--global` flag, for example like this: |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 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 | |
Junio C Hamano | 26e590a | 2008-02-17 03:53:51 | [diff] [blame] | 122 | GIT |
| 123 | --- |
Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 124 | Part of the linkgit:git[1] suite |