aboutsummaryrefslogtreecommitdiff
path: root/help/urlm_add_browser
blob: d2c83274ccd3ade126b545fca3b386cfe54429ed (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

URLM_ADD_BROWSER <tag>:<name>:<cmd-format>

Define a new browser. The arguments must be separated by : (colon)
characters, since <name> and <cmd-format> may contain spaces (<cmd-format>
generally *requires* spaces).

<tag> is a short unique identifier for the browser. Examples are "ff" for
Firefox or "moz" for Mozilla. The tag will be used to define a new irssi
command /urlm_open_<tag>, and (if urlm_short_cmds is ON) a new /<tag>
command. Tags must consist of only letters, numbers, or underscores,
and the special tag "wget" is reserved.

<name> is the full human-readable name of the browser. It may contain
any characters you like, except for colons, and is only used for
identification purposes (e.g. /urlm_list_browsers output).

<cmd-format> is the sprintf() format used to generate the full command
line required to run the browser. In simpler terms, it is the command
that runs the browser, with %s in place of the URL. It may contain
any characters other than colons.

Examples:
  /urlm_add_browser ff:Firefox:firefox -remote 'openurl(%s,new-tab)'
  /urlm_add_browser ie:Internet Explorer:wine iexplore.exe '%s'

The above examples define new /urlm_open_ff and /urlm_open_ie
commands. If urlm_short_cmds is ON, they also define new /ff and /ie
commands.

Note: in <cmd-format>, the %s must occur inside a set of single-quotes.
It need not be the only thing inside the quotes, however (see the firefox
example). This is because a shell is used to spawn the external program.
The URLM_ADD_BROWSER command checks for the quotes, and refuses to
allow a <cmd-format> that's missing the quotes or the %s.