Emacs: Eshell: Tweak history settings

master
Pierre Neidhardt 2017-06-27 21:13:51 +01:00
parent 3fc0047778
commit c0462b3bdf
1 changed files with 8 additions and 0 deletions

View File

@ -21,6 +21,8 @@
;; ffap-shell-prompt-regexp changes the behaviour of `helm-find-files' when
;; point is on prompt. I find this disturbing.
ffap-shell-prompt-regexp nil
eshell-history-size 1024
eshell-hist-ignoredups t
eshell-destroy-buffer-when-process-dies t)
;; TODO: Hour is printed twice. We don't need to set this?
@ -86,6 +88,12 @@
(add-hook 'eshell-mode-hook 'turn-off-nobreak-char-display)
(add-hook 'eshell-mode-hook 'eshell-cmpl-initialize)
;;; Filter out space-beginning commands from history.
(setq eshell-input-filter
(lambda (str)
(not (or (string= "" str)
(string-prefix-p " " str)))))
;;; REVIEW: Emacs' standard functions fail when output has empty lines.
;;; This implementation is more reliable.
;;; Reported at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27405.