Set exec-path based on PATH

This commit is contained in:
Peter Selby 2021-01-22 16:45:19 -06:00
parent bc8224ec11
commit 94f12b766f
1 changed files with 10 additions and 0 deletions

View File

@ -53,6 +53,8 @@
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented. ;; they are implemented.
(require 'cl)
(load! "site-functions.el") (load! "site-functions.el")
(setq-default tab-width 2) (setq-default tab-width 2)
@ -118,6 +120,14 @@
(setenv "PAGER" "cat") (setenv "PAGER" "cat")
(setenv "EDITOR" "emacsclient"))) (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 ((site-dir (expand-file-name "~/.doom.d/site.d/")))
(let ((configs (filter (lambda (name) (let ((configs (filter (lambda (name)
(not (or (string-match "~$" name) (not (or (string-match "~$" name)