webbrowser.*: let's open the file in a detached process

Seems more useful overall and matches how it already works on Windows.
db4
Björn Lindqvist 2015-11-04 11:35:40 +01:00
parent 7646ae71dd
commit 3718137969
3 changed files with 4 additions and 4 deletions

View File

@ -6,4 +6,4 @@ USING: arrays io.launcher kernel present system webbrowser ;
IN: webbrowser.linux
M: linux open-file ( path -- )
present "xdg-open" swap 2array try-process ;
present "xdg-open" swap 2array run-detached drop ;

View File

@ -6,4 +6,4 @@ USING: arrays io.launcher kernel present system webbrowser ;
IN: webbrowser.macosx
M: macosx open-file ( path -- )
present "open" swap 2array try-process ;
present "open" swap 2array run-detached drop ;

View File

@ -8,8 +8,8 @@ IN: webbrowser
HELP: open-file
{ $values { "path" string } }
{ $description
"Open a specified file or directory using the default "
"application, similar to double-clicking the file's icon."
"Open a specified file or directory in a detached process using "
"the default application, similar to double-clicking the file's icon."
} ;
HELP: open-url