Set exec-path based on PATH
This commit is contained in:
parent
bc8224ec11
commit
94f12b766f
10
config.el
10
config.el
|
@ -53,6 +53,8 @@
|
|||
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
||||
;; they are implemented.
|
||||
|
||||
(require 'cl)
|
||||
|
||||
(load! "site-functions.el")
|
||||
|
||||
(setq-default tab-width 2)
|
||||
|
@ -118,6 +120,14 @@
|
|||
(setenv "PAGER" "cat")
|
||||
(setenv "EDITOR" "emacsclient")))
|
||||
|
||||
(defun get-bash-path ()
|
||||
(let* ((bash-path (bash-env-var "PATH"))
|
||||
(path-dirs (split-string bash-path ":")))
|
||||
(filter #'file-directory-p path-dirs)))
|
||||
|
||||
(setq exec-path (remove-duplicates (append (get-bash-path) exec-path)
|
||||
:test #'equal))
|
||||
|
||||
(let ((site-dir (expand-file-name "~/.doom.d/site.d/")))
|
||||
(let ((configs (filter (lambda (name)
|
||||
(not (or (string-match "~$" name)
|
||||
|
|
Loading…
Reference in New Issue