summaryrefslogtreecommitdiff
path: root/.emacs.d
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-05-10 08:41:32 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-05-10 17:52:16 -0700
commit0728f904aca9dbbfe5873232279a3e367a583652 (patch)
treeb9503705ffb11ec611cbcdd1bd93b29cffb456a4 /.emacs.d
parent4f302813b15569fce72472a4e3c68528ded355a3 (diff)
downloaddotfiles-0728f904aca9dbbfe5873232279a3e367a583652.tar.gz
note idea for spw/eshell-cd
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/init.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index b202f49f..ac009401 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -1349,6 +1349,9 @@ don't consider windows satisfying the predicate EXCLUDE."
(lambda ()
(remove-hook 'eshell-exit-hook #'eshell-write-history t))))
+;; We could have an optional argument to kill any input and reinsert it after
+;; changing directory, and even restore point within that input. Might be
+;; useful in `spw/eshell-jump' & interactively.
(defun spw/eshell-cd (dir)
(delete-region eshell-last-output-end (point-max))
(when (> eshell-last-output-end (point))