[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master f1942c298cd: Make eshell-read-aliases-list an interactive command
From: |
Sean Whitton |
Subject: |
master f1942c298cd: Make eshell-read-aliases-list an interactive command |
Date: |
Fri, 9 Dec 2022 00:55:33 -0500 (EST) |
branch: master
commit f1942c298cd05f0a739a0c5fff4fc90dc566ae79
Author: Sean Whitton <spwhitton@spwhitton.name>
Commit: Sean Whitton <spwhitton@spwhitton.name>
Make eshell-read-aliases-list an interactive command
* 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 | 5 +++--
etc/NEWS | 5 +++++
lisp/eshell/em-alias.el | 4 +++-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index 8aa160d84eb..1383b412ce7 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -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
diff --git a/etc/NEWS b/etc/NEWS
index 7f073c4e2d3..61f813568f0 100644
--- 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.
+
* New Modes and Packages in Emacs 30.1
diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el
index 9ad218d5988..9b75c7a1237 100644
--- a/lisp/eshell/em-alias.el
+++ b/lisp/eshell/em-alias.el
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master f1942c298cd: Make eshell-read-aliases-list an interactive command,
Sean Whitton <=