about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--emacs.d/init-eshell.el15
1 files changed, 11 insertions, 4 deletions
diff --git a/emacs.d/init-eshell.el b/emacs.d/init-eshell.el
index 59cebe62a50d..2fd2ed9422f8 100644
--- a/emacs.d/init-eshell.el
+++ b/emacs.d/init-eshell.el
@@ -5,10 +5,17 @@
 (defvar home-dir)
 (setq home-dir (expand-file-name "~"))
 
-(setq eshell-path-env (concat
-		       "/usr/local/bin:"
-		       (concat home-dir "/bin:")
-		       eshell-path-env))
+(defun eshell-mode-hook-setup ()
+  "Sets up EShell when it is loaded"
+
+  (setq eshell-path-env (concat
+			 "/usr/local/bin:"
+			 (concat home-dir "/bin:")
+			 eshell-path-env))
+
+  (setenv "PATH" eshell-path-env))
+
+(add-hook 'eshell-mode-hook 'eshell-mode-hook-setup)
 
 ;; Prompt configuration