module Browser:sig
..end
Browser
shows URIs in the user's browsers. Up to severe
platform and browser application limitation it tries to limit
the creation of new tabs, reloading existing one which have the
same URI or are, if requested, prefixed by the URI.
val browser : B0_std.Cmd.t option Cmdliner.Term.t
browser
is a --browser
option and BROWSER
environment variable
to use with the browser
argument of B0_ui.Browser.find
.val prefix : bool Cmdliner.Term.t
val background : bool Cmdliner.Term.t
background
is a --background
option to use the background
argument of !show
.type
t
val find : ?search:B0_std.Fpath.t list ->
browser:B0_std.Cmd.t option ->
unit -> (t option, string) Pervasives.result
find ~search ~browser
tries to find a browser in a rather
complex and platform dependent way.val show : background:bool ->
prefix:bool ->
t option -> string -> (unit, string) Pervasives.result
show ~background ~prefix browser uri
shows URI using browser
browser
(if None
an error message is returned mentioning
that no browser was found. If background
is true
tries to
keep the browser application in the background, if false
brings it in user focus.
The function tries to limit the creation of new tabs using the following strategy:
uri
(or is prefixed by uri
when prefix
is true
), reload this tab.uri
(or is prefixed
by uri
when prefix
is true
), pick the left most one, make it
current in the window and reload it.uri
otherwise create a new tab
with uri
and make it current for the window.