Eshell: Keep history of commands exiting with non-zero
parent
11b2886c47
commit
cecb9f7163
|
@ -199,9 +199,13 @@
|
||||||
;;; Eshell commands always return 0.
|
;;; Eshell commands always return 0.
|
||||||
(setq eshell-input-filter
|
(setq eshell-input-filter
|
||||||
(lambda (str)
|
(lambda (str)
|
||||||
(not (or (/= eshell-last-command-status 0)
|
(not (or
|
||||||
(string= "" str)
|
;; Here we can filter out failing commands. This is usually a bad
|
||||||
(string-prefix-p " " str)))))
|
;; 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.
|
;;; Shared history.
|
||||||
(defvar ambrevar/eshell-history-global-ring nil
|
(defvar ambrevar/eshell-history-global-ring nil
|
||||||
|
|
Loading…
Reference in New Issue