aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorLiu Hui2023-11-16 11:45:28 +0800
committerSean Whitton2023-12-07 11:32:29 +0000
commit3a7abc7e497e77ba9bc5a71f3836636675dffe6b (patch)
tree204dc26cab928351231ebcd9e3669a324bdbdbf0 /doc/misc
parente4e1e268c8e9f7de6fe5d4b05beb595a1781c02c (diff)
downloademacs-3a7abc7e497e77ba9bc5a71f3836636675dffe6b.tar.gz
emacs-3a7abc7e497e77ba9bc5a71f3836636675dffe6b.zip
Add option eshell-history-append
* lisp/eshell/em-hist.el (eshell-history-append): New option. (eshell--save-history): New function. (eshell-hist-initialize): (eshell-save-some-history): Replace eshell-write-history with eshell--save-history, which respects the new option. * doc/misc/eshell.texi (History): Document the change. * etc/NEWS: Announce the change. (Bug#66700)
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/eshell.texi19
1 files changed, 14 insertions, 5 deletions
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index e8aa8cdc6a3..99a1491f1c3 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -1237,11 +1237,20 @@ command containing @code{foo}. The n-th argument of the last command
1237beginning with @code{foo} is accessible by @code{!foo:n}. 1237beginning with @code{foo} is accessible by @code{!foo:n}.
1238 1238
1239@vindex eshell-history-file-name 1239@vindex eshell-history-file-name
1240The history ring is loaded from a file at the start of every session, 1240@vindex eshell-history-append
1241and written back to the file at the end of every session. The file path 1241The history is loaded to the history ring from the file
1242is specified in @code{eshell-history-file-name}. Unlike other shells, 1242@code{eshell-history-file-name} at the start of every session, and
1243such as Bash, Eshell can not be configured to keep a history ring of a 1243saved to that file at the end of every session. The default history
1244different size than that of the history file. 1244saving behavior is to overwrite the history file with the whole
1245history ring of the session. If @code{eshell-history-append} is
1246non-@code{nil}, the history will instead be saved by appending new
1247entries from the session to the history file, which could prevent
1248potential history loss with multiple Eshell sessions. Unlike other
1249shells, such as Bash, Eshell cannot currently be configured to control
1250the size of the history file. In particular, when
1251@code{eshell-history-append} is non-@code{nil}, the size of the file
1252will keep increasing, and the recommended way to truncate the file is
1253to run the @samp{history -w} command in an Eshell session.
1245 1254
1246Since the default buffer navigation and searching key-bindings are 1255Since the default buffer navigation and searching key-bindings are
1247still present in the Eshell buffer, the commands for history 1256still present in the Eshell buffer, the commands for history