Disable history expansion in eshell (Bug#29157)
History expansion is not so useful since interactive history commands are already provided. It can produce surprising errors when the user is not aware of the history designator syntax. * lisp/eshell/em-hist.el (eshell-hist-initialize): Don't add eshell-expand-history-references to eshell-expand-input-functions. * etc/NEWS: Announce it.
This commit is contained in:
parent
cfa50d30f2
commit
1cdd0e8cd8
2 changed files with 9 additions and 3 deletions
9
etc/NEWS
9
etc/NEWS
|
@ -113,6 +113,15 @@ styles as configured by the variable 'completion-styles'.
|
|||
These macros are analogue to 'let' and 'let*', but create bindings that
|
||||
are evaluated lazily.
|
||||
|
||||
** Eshell
|
||||
|
||||
---
|
||||
*** Expansion of history event designators is disabled by default.
|
||||
To restore the old behavior, use
|
||||
|
||||
(add-hook 'eshell-expand-input-functions
|
||||
#'eshell-expand-history-references)
|
||||
|
||||
|
||||
* New Modes and Packages in Emacs 27.1
|
||||
|
||||
|
|
|
@ -218,9 +218,6 @@ Returns nil if INPUT is prepended by blank space, otherwise non-nil."
|
|||
|
||||
(defun eshell-hist-initialize ()
|
||||
"Initialize the history management code for one Eshell buffer."
|
||||
(add-hook 'eshell-expand-input-functions
|
||||
'eshell-expand-history-references nil t)
|
||||
|
||||
(when (eshell-using-module 'eshell-cmpl)
|
||||
(add-hook 'pcomplete-try-first-hook
|
||||
'eshell-complete-history-reference nil t))
|
||||
|
|
Loading…
Add table
Reference in a new issue