GNU bug report logs -
#25838
25.1; Eshell history polluted by eshell/clear
Previous Next
Reported by: Thomas Ferreira <thomas.ferreira <at> protonmail.com>
Date: Wed, 22 Feb 2017 16:10:01 UTC
Severity: minor
Tags: fixed, patch
Found in version 25.1
Fixed in version 26.1
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
In eshell:
~ $ history
1 history
~ $ eshell/clear
[...]
~ $
[...]
~ $ history
1 history
2 eshell/clear
3
[...]
4 history
An easy (dirty?) way to fix it could be override eshell-input-filter (from em-hist.el):
(defcustom eshell-input-filter
(function
(lambda (str)
(not (string-match "\\`\\s-*\\'" str))))
"Predicate for filtering additions to input history.
Takes one argument, the input. If non-nil, the input may be saved on
the input history list. Default is to save anything that isn't all
whitespace."
:type 'function
:group 'eshell-hist)
to:
(defcustom eshell-input-filter
(function
(lambda (str)
(not (string-match "\\`\\s-*\\'" (string-trim-left str)))))
"Predicate for filtering additions to input history.
Takes one argument, the input. If non-nil, the input may be saved on
the input history list. Default is to save anything that isn't all
whitespace."
:type 'function
:group 'eshell-hist)
[Message part 2 (text/html, inline)]
This bug report was last modified 8 years and 137 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.