Eshell: Keep history of commands exiting with non-zero

master
Pierre Neidhardt 2018-03-19 16:03:19 +05:30
parent 11b2886c47
commit cecb9f7163
1 changed files with 7 additions and 3 deletions

View File

@ -199,9 +199,13 @@
;;; Eshell commands always return 0.
(setq eshell-input-filter
(lambda (str)
(not (or (/= eshell-last-command-status 0)
(string= "" str)
(string-prefix-p " " str)))))
(not (or
;; Here we can filter out failing commands. This is usually a bad
;; idea since a lot of useful commands have non-zero exit codes
;; (including Emacs/Eshell functions).
;; (/= eshell-last-command-status 0)
(string= "" str)
(string-prefix-p " " str)))))
;;; Shared history.
(defvar ambrevar/eshell-history-global-ring nil