diff options
Diffstat (limited to 'modules/dirvish-config.el')
| -rw-r--r-- | modules/dirvish-config.el | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/modules/dirvish-config.el b/modules/dirvish-config.el index 89f6c397..d5834dac 100644 --- a/modules/dirvish-config.el +++ b/modules/dirvish-config.el @@ -246,21 +246,6 @@ Examples: ;;; ----------------------- Dirvish Open File Manager Here ---------------------- -(defun cj/--file-manager-program-for (has-xdg-open-p system-type) - "Return the file-manager command for HAS-XDG-OPEN-P + SYSTEM-TYPE, or nil. - -Pure helper used by `cj/dirvish-open-file-manager-here'. When -HAS-XDG-OPEN-P is non-nil, returns \"xdg-open\" regardless of -SYSTEM-TYPE -- xdg-open works on Linux and many ported environments. -Without xdg-open, falls back to `darwin' -> \"open\", `windows-nt' -> -\"explorer\", everything else -> nil so the caller can shell-command -its way out." - (cond - (has-xdg-open-p "xdg-open") - ((eq system-type 'darwin) "open") - ((eq system-type 'windows-nt) "explorer") - (t nil))) - (defun cj/dirvish-open-file-manager-here () "Open system's default file manager in the current dired/dirvish directory. Always opens the file manager in the directory currently being displayed, @@ -271,9 +256,8 @@ regardless of what file or subdirectory the point is on." (progn (message "Opening file manager in %s..." current-dir) ;; Use pipe instead of pty for the async call-process below. - (let* ((process-connection-type nil) - (program (cj/--file-manager-program-for - (executable-find "xdg-open") system-type))) + (let ((process-connection-type nil) + (program (cj/external-open-command))) (if program (call-process program nil 0 nil current-dir) (shell-command (format "xdg-open %s &" |
