Created
July 27, 2010 18:15
-
-
Save jcrossley3/492610 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Setup PATH | |
(setenv "PATH" (shell-command-to-string "source ~/.bashrc; echo -n $PATH")) | |
;; Update exec-path with the contents of $PATH | |
(loop for path in (split-string (getenv "PATH") ":") do | |
(add-to-list 'exec-path path)) | |
;; Grab other environment variables | |
(loop for var in (split-string (shell-command-to-string "source ~/.bashrc; env")) do | |
(let* ((pair (split-string var "=")) | |
(key (car pair)) | |
(value (cadr pair))) | |
(unless (getenv key) | |
(setenv key value)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment