diff --git a/starter-kit-eshell.el b/starter-kit-eshell.el index a4e0abf826..8de3d051ce 100644 --- a/starter-kit-eshell.el +++ b/starter-kit-eshell.el @@ -11,20 +11,20 @@ (require 'em-prompt) (require 'em-term) (require 'em-cmpl) - ;; TODO: for some reason requiring this here breaks it, but - ;; requiring it after an eshell session is started works fine. - ;; (require 'eshell-vc) (setenv "PAGER" "cat") (set-face-attribute 'eshell-prompt nil :foreground "turquoise1") - (add-hook 'eshell-mode-hook ;; for some reason this needs to be a hook - '(lambda () (define-key eshell-mode-map "\C-a" 'eshell-bol))) + (when (< emacs-major-version 23) + (add-hook 'eshell-mode-hook ;; for some reason this needs to be a hook + '(lambda () (define-key eshell-mode-map "\C-a" 'eshell-bol))) + (add-to-list 'eshell-output-filter-functions 'eshell-handle-ansi-color)) + + ;; TODO: submit these via M-x report-emacs-bug (add-to-list 'eshell-visual-commands "ssh") (add-to-list 'eshell-visual-commands "tail") (add-to-list 'eshell-command-completions-alist '("gunzip" "gz\\'")) (add-to-list 'eshell-command-completions-alist - '("tar" "\\(\\.tar|\\.tgz\\|\\.tar\\.gz\\)\\'")) - (add-to-list 'eshell-output-filter-functions 'eshell-handle-ansi-color))) + '("tar" "\\(\\.tar|\\.tgz\\|\\.tar\\.gz\\)\\'")))) (defun eshell/cds () "Change directory to the project's root."