forked from tphelps/xtickertape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
show-url.1
109 lines (109 loc) · 3.33 KB
/
show-url.1
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
.TH SHOW\-URL 1 "2006 June 17"
.ds su \fIshow\-url\fP
.ds Su \fIShow\-url\fP
.UC 4
.SH NAME
show\-url \- show a URL in netscape
.SH SYNOPSIS
.nf
show\-url [OPTION]... [filename]
show\-url [OPTION]... \-u url
.fi
.SH OPTIONS
\*(Su may be invoked with the following command-line option:
.TP
.B \-b \fIbrowser\fP
.TP
.BI \-\-browser= browser
Override the value of the BROWSER environment variable. See
DESCRIPTION below for details.
.TP
.B \-d
.TP
.B \-\-debug
.TP
.BI \-\-debug= level
Set the debug level. Without a level, this will increase the
debugging level by one.
.TP
.B \-u \fIurl\fP
.TP
.BI \-\-url= url
Display \fIurl\fP rather than reading one from a file. If \fIurl\fP
names a readable file then a corresponding file url will be
constructed. Otherwise \fIurl\fP will be passed to the browser
without modification.
.TP
.B \-v
.TP
.B \-\-version
Print out the show\-url version and exit.
.B \-h
.TP
.B \-\-help
Print a usage message briefly summarizing these command-line options
and then exit.
.SH DESCRIPTION
\*(Su is deigned to be a handler for the text/uri\-list MIME type. It
attempts to display the URL listed in the first line of \fIfilename\fP
in a web browser. If \fIfilename\fP is "\-" or neither \fIfilename\fP
or \fIurl\fP is given then the URL is read from stdin.
.PP
The command used to invoke the web browser is specified by the BROWSER
environment variable, which is a colon-separated list of Bourne shell
expressions. Each expression may optionally contain `%s' which will
be replaced with the URL when executing the expression. `%\fIc\fP'
where \fIc\fP is not `s' will be replaced simply by \fIc\fP, thus the
expression may use `%%s' to generate a literal `%s' and `%:' for a
literal `:'. If the expression does not contain a `%s' then the URL
is appended to the end of the expression.
.PP
Shell expressions are executed until one exits with a zero status
code.
.PP
Characters in the URL which
are meaningful to the shell are escaped to prevent malicious URLs from
doing naughty things.
.SH EXAMPLES
Here are some example values for the BROWSER variable:
.TP 10
.B
w3m
This will open the URL in w3m in the current terminal window.
.TP
.B
mozilla \-raise \-remote "openURL(%s,new\-window)"
Requests that the running mozilla process open the URL in a new
window.
.TP
.B
mozilla \-raise \-remote "openURL(%s,new\-window)":w3m
A combination of the above two. If mozilla cannot open the window
because it isn't running or there's not even an X session, then w3m is
invoked to display the URL.
.TP
.B
netscape \-raise \-remote "openURL(%s,new\-window)":lynx
This is effectively the same as the previous example except that
netscape replaces mozilla as the graphical browser, and lynx replaces
w3m as the text-based one.
.SH ENVIRONMENT
.TP 10
.SB BROWSER
See DESCRIPTION above for an explanation of this variable. If BROWSER
is not set no browser is specified on the command-line then the
expression given in the last example above is used.
.SH SEE ALSO
.BR xtickertape (1),
.na
http://tuxedo.org/~esr/BROWSER/index.html
.SH BUGS
E-mail bug reports to
.BR phelps@pobox.com .
Be sure to include the word "show\-url" somewhere in the "Subject:"
field.
.SH AUTHORS
\*(Su was written by Ted Phelps <phelps@pobox.com>. Additional help
was provided by David Arnold <davida@pobox.com>. Eric S. Raymond
<esr@thyrsus.com> is responsible for the BROWSER environment variable
format.