1234567891011121314151617181920212223242526272829303132333435363738(*---------------------------------------------------------------------------
Copyright (c) 2016 Daniel C. Bünzli. All rights reserved.
SPDX-License-Identifier: ISC
---------------------------------------------------------------------------*)openCmdlineropenBosletbrowser=letenv=Cmdliner.Cmd.Env.info"BROWSER"inletbrowser=letparses=Result.mapOption.some(OS.Env.cmds)inletppppf=function|None->Format.fprintfppf"OS specific fallback"|Somecmd->Cmd.ppppfcmdinArg.conv(parse,pp)inletdoc="The WWW browser command $(docv) to use. The value may be interpreted
and massaged depending on the OS. On Darwin it is sufficient to
specify the name of a known existing browser; if absent the
application that handles the 'http' URI scheme is used.
Complaints and help to improve support are gladly taken
at $(i,https://github.com/dbuenzli/webbrowser/issues/1)."inletdocv="CMD"inArg.(value&optbrowserNone&info["b";"browser"]~env~doc~docv)letprefix=letdoc="Reload the first browser tab which has the URI as a prefix
(rather than the exact URI)."inArg.(value&flag&info["p";"prefix"]~doc)letbackground=letdoc="Reload URI but keep the browser application in the background."inArg.(value&flag&info["g";"background"]~doc)