mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
openDefaultBrowser now works on OSX (#13892) [backport]
(cherry picked from commit e6d870896b)
This commit is contained in:
@@ -20,9 +20,9 @@ else:
|
||||
import os, osproc
|
||||
|
||||
const osOpenCmd* =
|
||||
when defined(macos) or defined(windows): "open" else: "xdg-open" ## \
|
||||
when defined(macos) or defined(macosx) or defined(windows): "open" else: "xdg-open" ## \
|
||||
## Alias for the operating system specific *"open"* command,
|
||||
## ``"open"`` on MacOS and Windows, ``"xdg-open"`` on Linux, BSD, etc.
|
||||
## ``"open"`` on OSX, MacOS and Windows, ``"xdg-open"`` on Linux, BSD, etc.
|
||||
|
||||
proc openDefaultBrowser*(url: string) =
|
||||
## opens `url` with the user's default browser. This does not block.
|
||||
|
||||
Reference in New Issue
Block a user