Rework +eshell/at-cwd to use changes to +eshell/open
This commit is contained in:
@@ -50,13 +50,15 @@
|
|||||||
(eshell/cd wrapped-dir)))
|
(eshell/cd wrapped-dir)))
|
||||||
|
|
||||||
;; Additional functions
|
;; Additional functions
|
||||||
(defun +eshell/at-cwd ()
|
(defun +eshell/at-cwd (&optional arg)
|
||||||
"Open an instance of eshell at the current working directory."
|
"Open an instance of eshell at the current working directory.
|
||||||
(interactive)
|
|
||||||
|
Pass argument to `+eshell/open'."
|
||||||
|
(interactive "P")
|
||||||
(let ((dir (if buffer-file-name
|
(let ((dir (if buffer-file-name
|
||||||
(file-name-directory buffer-file-name)
|
(file-name-directory buffer-file-name)
|
||||||
default-directory))
|
default-directory))
|
||||||
(buf (eshell)))
|
(buf (+eshell/open arg)))
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
(eshell/cd dir)
|
(eshell/cd dir)
|
||||||
(eshell-send-input))))
|
(eshell-send-input))))
|
||||||
|
|||||||
Reference in New Issue
Block a user