summaryrefslogtreecommitdiff
path: root/tex/context/base/l-os.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/l-os.lua')
-rw-r--r--tex/context/base/l-os.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/tex/context/base/l-os.lua b/tex/context/base/l-os.lua
index f9bd46e51..7c9ce307b 100644
--- a/tex/context/base/l-os.lua
+++ b/tex/context/base/l-os.lua
@@ -136,12 +136,14 @@ else
os.libsuffix, os.binsuffix, os.binsuffixes = 'so', '', { '' }
end
+local launchers = {
+ windows = "start %s",
+ macosx = "open %s",
+ unix = "$BROWSER %s &> /dev/null &",
+}
+
function os.launch(str)
- if os.type == "windows" then
- os.execute("start " .. str) -- os.spawn ?
- else
- os.execute(str .. " &") -- os.spawn ?
- end
+ os.execute(format(launchers[os.name] or launchers.unix,str))
end
if not os.times then