summaryrefslogtreecommitdiffstats
path: root/man1/git-web--browse.1
blob: 8e6100d7d15663ea3237777b7e98292a180ec306 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
'\" t
.\"     Title: git-web--browse
.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 2024-04-10
.\"    Manual: Git Manual
.\"    Source: Git 2.44.0.568.g436d4e5b14
.\"  Language: English
.\"
.TH "GIT\-WEB\-\-BROWSE" "1" "2024\-04\-10" "Git 2\&.44\&.0\&.568\&.g436d4e" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-web--browse \- Git helper script to launch a web browser
.SH "SYNOPSIS"
.sp
.nf
\fIgit web\-\-browse\fR [<options>] (<URL>|<file>)\&...
.fi
.sp
.SH "DESCRIPTION"
.sp
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\&.
.sp
The following browsers (or commands) are currently supported:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
firefox (this is the default under X Window when not using KDE)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
iceweasel
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
seamonkey
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
iceape
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
chromium (also supported as chromium\-browser)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
google\-chrome (also supported as chrome)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
konqueror (this is the default under KDE, see
\fINote about konqueror\fR
below)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
opera
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
w3m (this is the default outside graphical environments)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
elinks
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
links
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
lynx
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
dillo
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
open (this is the default under Mac OS X GUI)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
start (this is the default under MinGW)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
cygstart (this is the default under Cygwin)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
xdg\-open
.RE
.sp
Custom commands may also be specified\&.
.SH "OPTIONS"
.PP
\-b <browser>, \-\-browser=<browser>
.RS 4
Use the specified browser\&. It must be in the list of supported browsers\&.
.RE
.PP
\-t <browser>, \-\-tool=<browser>
.RS 4
Same as above\&.
.RE
.PP
\-c <conf\&.var>, \-\-config=<conf\&.var>
.RS 4
CONF\&.VAR is looked up in the Git config files\&. If it\(cqs set, then its value specifies the browser that should be used\&.
.RE
.SH "CONFIGURATION VARIABLES"
.SS "CONF\&.VAR (from \-c option) and web\&.browser"
.sp
The web browser can be specified using a configuration variable passed with the \-c (or \-\-config) command\-line option, or the \fBweb\&.browser\fR configuration variable if the former is not used\&.
.SS "browser\&.<tool>\&.path"
.sp
You can explicitly provide a full path to your preferred browser by setting the configuration variable \fBbrowser\&.<tool>\&.path\fR\&. For example, you can configure the absolute path to firefox by setting \fIbrowser\&.firefox\&.path\fR\&. Otherwise, \fIgit web\-\-browse\fR assumes the tool is available in PATH\&.
.SS "browser\&.<tool>\&.cmd"
.sp
When the browser, specified by options or configuration variables, is not among the supported ones, then the corresponding \fBbrowser\&.<tool>\&.cmd\fR configuration variable will be looked up\&. If this variable exists then \fIgit web\-\-browse\fR 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\&.
.SH "NOTE ABOUT KONQUEROR"
.sp
When \fIkonqueror\fR is specified by a command\-line option or a configuration variable, we launch \fIkfmclient\fR to try to open the HTML man page on an already opened konqueror in a new tab if possible\&.
.sp
For consistency, we also try such a trick if \fIbrowser\&.konqueror\&.path\fR is set to something like \fBA_PATH_TO/konqueror\fR\&. That means we will try to launch \fBA_PATH_TO/kfmclient\fR instead\&.
.sp
If you really want to use \fIkonqueror\fR, then you can use something like the following:
.sp
.if n \{\
.RS 4
.\}
.nf
        [web]
                browser = konq

        [browser "konq"]
                cmd = A_PATH_TO/konqueror
.fi
.if n \{\
.RE
.\}
.sp
.SS "Note about git\-config \-\-global"
.sp
Note that these configuration variables should probably be set using the \fB\-\-global\fR flag, for example like this:
.sp
.if n \{\
.RS 4
.\}
.nf
$ git config \-\-global web\&.browser firefox
.fi
.if n \{\
.RE
.\}
.sp
.sp
as they are probably more user specific than repository specific\&. See \fBgit-config\fR(1) for more information about this\&.
.SH "GIT"
.sp
Part of the \fBgit\fR(1) suite