[Utils] Use ‘cygstart’ to open documents in custom helm interface

This commit is contained in:
Daniel - 2018-01-16 08:44:44 +01:00
parent 73459ec88a
commit d635236e48
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 7 additions and 3 deletions

View File

@ -281,9 +281,13 @@ path."
(defun db/system-open (path)
"Open PATH with default program as defined by the underlying system."
(if on-windows
(w32-shell-execute "open" path)
(start-process "" nil "xdg-open" path)))
(cond
((eq system-type 'windows-nt)
(w32-shell-execute "open" path))
((eq system-type 'cygwin)
(start-process "" nil "cygstart" path))
(t
(start-process "" nil "xdg-open" path))))
(defvar db/helm-source-important-documents
'((name . "Important files")