mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-09 12:20:27 -08:00
more opens
This commit is contained in:
parent
0accada4b4
commit
798ad3a201
3 changed files with 62 additions and 21 deletions
|
|
@ -180,6 +180,19 @@ BOOT-FILE will be used. If BOOT-FILE is nil path is removed."
|
|||
"Turn on browser console debugging for OBJ's connection."
|
||||
(clog-connection:debug-mode (connection-id obj)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; open-file-with-os ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defun open-file-with-os (path)
|
||||
"Open PATH using OS"
|
||||
#+windows
|
||||
(uiop:launch-program (list "explorer.exe" (uiop:native-namestring path)))
|
||||
#+linux
|
||||
(uiop:launch-program (list "xdg-open" (uiop:native-namestring path)))
|
||||
#+darwin
|
||||
(uiop:launch-program (list "open" (uiop:native-namestring path))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;
|
||||
;; open-browser ;;
|
||||
;;;;;;;;;;;;;;;;;;
|
||||
|
|
@ -187,7 +200,10 @@ BOOT-FILE will be used. If BOOT-FILE is nil path is removed."
|
|||
(defun open-browser (&key (url (format nil "http://127.0.0.1:~A" *clog-port*)))
|
||||
"Launch on os a web browser on local machine to URL. See OPEN-WINDOW
|
||||
for openning windows on remote machines."
|
||||
(handler-case
|
||||
(trivial-open-browser:open-browser url)
|
||||
(error (c)
|
||||
(format t "Unable to open browser.~%~%~A" c))))
|
||||
#+windows
|
||||
(uiop:launch-program (list "rundll32" "url.dll,FileProtocolHandler" url))
|
||||
#+linux
|
||||
(uiop:launch-program (list "xdg-open" url))
|
||||
#+darwin
|
||||
(uiop:launch-program (list "open" url)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue