]> git.eshelyaron.com Git - emacs.git/commitdiff
Disable history expansion in eshell (Bug#29157)
authorNoam Postavsky <npostavs@gmail.com>
Thu, 23 Nov 2017 02:59:35 +0000 (21:59 -0500)
committerNoam Postavsky <npostavs@gmail.com>
Sun, 3 Dec 2017 20:39:02 +0000 (15:39 -0500)
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.

etc/NEWS
lisp/eshell/em-hist.el

index 6b3e7fc244b95a5c4b09bb79f70df2ad78586f3d..cbd50f02272acac075cd68a02ee5ce11efdb4e85 100644 (file)
--- a/etc/NEWS
+++ b/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)
+
 \f
 * New Modes and Packages in Emacs 27.1
 
index 8084c12653065c47a65f1373d1b29d1bdeaa5aa7..df462a70587356a93a08bd56d0902e6bd83cd23e 100644 (file)
@@ -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))