]> git.eshelyaron.com Git - emacs.git/commitdiff
Make eshell-read-aliases-list an interactive command
authorSean Whitton <spwhitton@spwhitton.name>
Fri, 9 Dec 2022 05:54:58 +0000 (22:54 -0700)
committerSean Whitton <spwhitton@spwhitton.name>
Fri, 9 Dec 2022 05:55:28 +0000 (22:55 -0700)
* lisp/eshell/em-alias.el (eshell-read-aliases-list): Add interactive
specification.  Note in docstring that the command is useful after
manually editing eshell-aliases-file.
* etc/NEWS:
* doc/misc/eshell.texi (Aliases): Document the change.

doc/misc/eshell.texi
etc/NEWS
lisp/eshell/em-alias.el

index 8aa160d84eb50f8d149c3d0a727386067d6423af..1383b412ce7fdcbd3038f56b8bdba7f418449343 100644 (file)
@@ -1028,14 +1028,15 @@ necessary.  Its value is @code{@var{emacs-version},eshell}.
 @section Aliases
 
 @vindex $*
+@findex eshell-expand-history-references
 Aliases are commands that expand to a longer input line.  For example,
 @command{ll} is a common alias for @code{ls -l}, and would be defined
 with the command invocation @kbd{alias ll 'ls -l $*'}; with this defined,
 running @samp{ll foo} in Eshell will actually run @samp{ls -l foo}.
 Aliases defined (or deleted) by the @command{alias} command are
 automatically written to the file named by @code{eshell-aliases-file},
-which you can also edit directly (although you will have to manually
-reload it).
+which you can also edit directly.  After doing so, use @w{@kbd{M-x
+eshell-read-aliases-list}} to load the edited aliases.
 
 @vindex $1, $2, @dots{}
 Note that unlike aliases in Bash, arguments must be handled
index 7f073c4e2d32e2e3d440784229f398515173ad01..61f813568f07e1ca87867e9bd4d1ba98e2e29a35 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -56,6 +56,11 @@ switches for shortlogs, such as the one produced by 'C-x v L'.
 You can now configure how to display the "*buffer-selection*" buffer
 using this new option.  (Or set 'display-buffer-alist' directly.)
 
++++
+*** 'eshell-read-aliases-list' is now an interactive command.
+After manually editing 'eshell-aliases-file', you can use
+'M-x eshell-read-aliases-list' to load the edited aliases.
+
 \f
 * New Modes and Packages in Emacs 30.1
 
index 9ad218d59885fdb66c4d0c8bfb82b38237c33661..9b75c7a1237ae8332b78b02eee26fad5656c4e65 100644 (file)
@@ -183,7 +183,9 @@ file named by `eshell-aliases-file'.")
   (pcomplete-here (eshell-alias-completions pcomplete-stub)))
 
 (defun eshell-read-aliases-list ()
-  "Read in an aliases list from `eshell-aliases-file'."
+  "Read in an aliases list from `eshell-aliases-file'.
+This is useful after manually editing the contents of the file."
+  (interactive)
   (let ((file eshell-aliases-file))
     (when (file-readable-p file)
       (setq eshell-command-aliases-list