aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-10-16 16:32:22 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-10-16 16:32:58 +0100
commitf1b4f6eed49b328f25472c397f8d91314674e261 (patch)
tree5493214c82f9b082930e0147cc0581f7af7f01ed
parent930d35965741524ce9ae30668c5d89559d23ce1a (diff)
downloaddotfiles-f1b4f6eed49b328f25472c397f8d91314674e261.tar.gz
dotfiles-f1b4f6eed49b328f25472c397f8d91314674e261.tar.bz2
dotfiles-f1b4f6eed49b328f25472c397f8d91314674e261.zip
Rework +eshell/at-cwd to use changes to +eshell/open
-rw-r--r--Emacs/.config/emacs/elisp/eshell-additions.el10
1 files changed, 6 insertions, 4 deletions
diff --git a/Emacs/.config/emacs/elisp/eshell-additions.el b/Emacs/.config/emacs/elisp/eshell-additions.el
index 0abaf6a..0436851 100644
--- a/Emacs/.config/emacs/elisp/eshell-additions.el
+++ b/Emacs/.config/emacs/elisp/eshell-additions.el
@@ -50,13 +50,15 @@
(eshell/cd wrapped-dir)))
;; Additional functions
-(defun +eshell/at-cwd ()
- "Open an instance of eshell at the current working directory."
- (interactive)
+(defun +eshell/at-cwd (&optional arg)
+ "Open an instance of eshell at the current working directory.
+
+Pass argument to `+eshell/open'."
+ (interactive "P")
(let ((dir (if buffer-file-name
(file-name-directory buffer-file-name)
default-directory))
- (buf (eshell)))
+ (buf (+eshell/open arg)))
(with-current-buffer buf
(eshell/cd dir)
(eshell-send-input))))