all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#25838: 25.1; Eshell history polluted by eshell/clear
@ 2017-02-22 11:03 Thomas Ferreira
  2017-02-23  3:05 ` npostavs
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Ferreira @ 2017-02-22 11:03 UTC (permalink / raw)
  To: 25838

[-- Attachment #1: Type: text/plain, Size: 907 bytes --]

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)

[-- Attachment #2: Type: text/html, Size: 1793 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-27  1:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-22 11:03 bug#25838: 25.1; Eshell history polluted by eshell/clear Thomas Ferreira
2017-02-23  3:05 ` npostavs
2017-02-23  9:20   ` Thomas Ferreira
2017-02-27  1:42     ` npostavs

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.