[osx] use init instead of post-init for exec-path-from-shell.

This commit is contained in:
Christopher Eames (Chream) 2018-06-16 11:38:53 +02:00 committed by Maximilian Wolff
parent b29f72b43a
commit 0141c804f0
No known key found for this signature in database
GPG Key ID: 2DD07025BFDBD89A
1 changed files with 16 additions and 10 deletions

View File

@ -27,16 +27,22 @@
(when (boundp 'mac-system-move-file-to-trash-use-finder)
(setq mac-system-move-file-to-trash-use-finder t)))
(defun osx/post-init-exec-path-from-shell ()
;; Use GNU ls as `gls' from `coreutils' if available. Add `(setq
;; dired-use-ls-dired nil)' to your config to suppress the Dired warning when
;; not using GNU ls. We must look for `gls' after `exec-path-from-shell' was
;; initialized to make sure that `gls' is in `exec-path'
(when (spacemacs/system-is-mac)
(let ((gls (executable-find "gls")))
(when gls
(setq insert-directory-program gls
dired-listing-switches "-aBhl --group-directories-first")))))
(defun osx/init-exec-path-from-shell ()
(use-package exec-path-from-shell
:if (spacemacs/system-is-mac)
:defer nil
:config
(progn
(exec-path-from-shell-initialize)
(when (spacemacs/system-is-mac)
;; Use GNU ls as `gls' from `coreutils' if available. Add `(setq
;; dired-use-ls-dired nil)' to your config to suppress the Dired warning when
;; not using GNU ls. We must look for `gls' after `exec-path-from-shell' was
;; initialized to make sure that `gls' is in `exec-path'
(let ((gls (executable-find "gls")))
(when gls
(setq insert-directory-program gls
dired-listing-switches "-aBhl --group-directories-first")))))))
(defun osx/pre-init-helm ()
;; Use `mdfind' instead of `locate'.