From f1b4f6eed49b328f25472c397f8d91314674e261 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 16 Oct 2024 16:32:22 +0100 Subject: Rework +eshell/at-cwd to use changes to +eshell/open --- Emacs/.config/emacs/elisp/eshell-additions.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Emacs/.config/emacs/elisp/eshell-additions.el') 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)))) -- cgit v1.2.3-13-gbd6f