mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-06 02:30:33 -08:00
fix(macos): avoid calling nushell's open
Using `shell-command` risks calling any `open` commands defined by the user's $SHELL.
This commit is contained in:
parent
6010b40247
commit
5b5b170f79
1 changed files with 5 additions and 6 deletions
|
|
@ -13,12 +13,11 @@
|
|||
(dired-get-file-for-visit)
|
||||
(buffer-file-name)))
|
||||
nil t)))
|
||||
(command (format "open %s"
|
||||
(if app-name
|
||||
(format "-a %s '%s'" (shell-quote-argument app-name) path)
|
||||
(format "'%s'" path)))))
|
||||
(message "Running: %s" command)
|
||||
(shell-command command)))
|
||||
(args (cons "open"
|
||||
(append (if app-name (list "-a" app-name))
|
||||
(list path)))))
|
||||
(message "Running: %S" args)
|
||||
(apply #'doom-call-process args)))
|
||||
|
||||
(defmacro +macos--open-with (id &optional app dir)
|
||||
`(defun ,(intern (format "+macos/%s" id)) ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue