summaryrefslogtreecommitdiff
path: root/config/init-eshell.el
diff options
context:
space:
mode:
Diffstat (limited to 'config/init-eshell.el')
-rw-r--r--config/init-eshell.el52
1 files changed, 52 insertions, 0 deletions
diff --git a/config/init-eshell.el b/config/init-eshell.el
new file mode 100644
index 0000000..3eb2175
--- /dev/null
+++ b/config/init-eshell.el
@@ -0,0 +1,52 @@
+;;; init-eshell.el --- configure eshell -*- lexical-binding: t -*-
+;; Author: Franck Cuny <franck@fcuny.net>
+
+;;; Commentary:
+
+;; configure eshell
+
+;;; Code:
+
+(use-package eshell
+ :commands (eshell eshell-command)
+ :custom
+ (eshell-directory-name (emacs-path "eshell"))
+ (eshell-hist-ignoredups t)
+ (eshell-history-size 50000)
+ (eshell-ls-dired-initial-args '("-h"))
+ (eshell-ls-exclude-regexp "~\\'")
+ (eshell-ls-initial-args "-h")
+ (eshell-modules-list
+ '(eshell-alias
+ eshell-basic
+ eshell-cmpl
+ eshell-dirs
+ eshell-glob
+ eshell-hist
+ eshell-ls
+ eshell-pred
+ eshell-prompt
+ eshell-rebind
+ eshell-script
+ eshell-term
+ eshell-unix
+ eshell-xtra))
+ (eshell-prompt-function
+ (lambda nil
+ (concat (abbreviate-file-name (eshell/pwd))
+ (if (= (user-uid) 0)
+ " # " " $ "))))
+ (eshell-save-history-on-exit t)
+ (eshell-stringify-t nil)
+ (eshell-term-name "ansi")
+
+ :preface
+ (defun eshell-initialize ()
+ (add-hook 'eshell-expand-input-functions #'eshell-spawn-external-command)
+
+ :init
+ (add-hook 'eshell-first-time-mode-hook #'eshell-initialize)))
+
+(provide 'init-eshell)
+
+;;; init-eshell.el ends here