last stdlib cleanups
This commit is contained in:
parent
9776f926a2
commit
5abe880469
31 changed files with 136 additions and 42 deletions
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
## This module implements a simple proc for opening URLs with the user's
|
||||
## default browser.
|
||||
##
|
||||
## Unstable API.
|
||||
|
||||
import strutils
|
||||
|
||||
|
|
@ -22,8 +24,10 @@ proc openDefaultBrowser*(url: string) =
|
|||
##
|
||||
## Under Windows, ``ShellExecute`` is used. Under Mac OS X the ``open``
|
||||
## command is used. Under Unix, it is checked if ``xdg-open`` exists and
|
||||
## used if it does. Otherwise the environment variable ``BROWSER`` is
|
||||
## used if it does. Otherwise the environment variable ``BROWSER`` is
|
||||
## used to determine the default browser to use.
|
||||
##
|
||||
## This proc doesn't raise an exception on error, beware.
|
||||
when defined(windows):
|
||||
var o = newWideCString("open")
|
||||
var u = newWideCString(url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue