Permalink
Browse files

Also set eshell-path-env when setting exec-path from $PATH

  • Loading branch information...
1 parent ed17558 commit 0b59ea733b089b1c8f7c06f6a6c11e35f9876693 @purcell committed Nov 8, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 exec-path-from-shell.el
View
@@ -81,14 +81,15 @@ variable of NAME and return this output as string."
(defun exec-path-from-shell-copy-env (name)
"Set the environment variable $NAME from the user's shell.
-As a special case, if the variable is $PATH, then `exec-path' is
-also set appropriately. Return the value of the environment
-variable."
+As a special case, if the variable is $PATH, then `exec-path' and
+`eshell-path-env' are also set appropriately. Return the value
+of the environment variable."
(interactive "sCopy value of which environment variable from shell? ")
(prog1
(setenv name (exec-path-from-shell-getenv name))
(when (string-equal "PATH" name)
- (setq exec-path (split-string (getenv "PATH") path-separator)))))
+ (setq eshell-path-env (getenv "PATH")
+ exec-path (split-string (getenv "PATH") path-separator)))))
;;;###autoload
(defun exec-path-from-shell-initialize ()

0 comments on commit 0b59ea7

Please sign in to comment.