about summary refs log tree commit diff
path: root/emacs.d/init-eshell.el
diff options
context:
space:
mode:
authorVincent Ambo <vincent@spotify.com>2013-07-22T09·43+0200
committerVincent Ambo <vincent@spotify.com>2013-07-22T09·43+0200
commit2e9b4cf111b3ba46994b6bb608aca5e07ac00b75 (patch)
treeac85ad0fe099bf394ace2cd4292c3757b09f2d85 /emacs.d/init-eshell.el
parent818b2eb2d5349935055304150a50651fa13b18b1 (diff)
emacs: Fixed EShell path
Diffstat (limited to 'emacs.d/init-eshell.el')
-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 59cebe62a5..2fd2ed9422 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