breakpoint (e.g. with "f" and "o") by customizing the new option
'edebug-sit-on-break'.
+** Eshell
+
+*** 'eshell-input-filter's value is now a named function
+'eshell-input-filter-default', and has a new custom option
+'eshell-input-filter-initial-space' to ignore adding commands prefixed
+with blank space to eshell history.
+
** eww
+++
(const :tag "Always save" t))
:group 'eshell-hist)
-(defcustom eshell-input-filter
- (function
- (lambda (str)
- (not (string-match "\\`\\s-*\\'" str))))
+(defcustom eshell-input-filter 'eshell-input-filter-default
"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
+ :type '(radio (function-item eshell-input-filter-default)
+ (function-item eshell-input-filter-initial-space)
+ (function :tag "Other function"))
:group 'eshell-hist)
(put 'eshell-input-filter 'risky-local-variable t)
;;; Functions:
+(defun eshell-input-filter-default (input)
+ "Do not add blank input to input history.
+Returns non-nil if INPUT is blank."
+ (not (string-match "\\`\\s-*\\'" input)))
+
+(defun eshell-input-filter-initial-space (input)
+ "Do not add input beginning with empty space to history.
+Returns nil if INPUT is prepended by blank space, otherwise non-nil."
+ (not (string-match-p "\\`\\s-+" input)))
+
(defun eshell-hist-initialize ()
"Initialize the history management code for one Eshell buffer."
(add-hook 'eshell-expand-input-functions