summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/emacs/init.el b/emacs/init.el
index e88c9233..96d105e5 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -743,6 +743,13 @@ Also returns nil if pid is nil."
                             eshell-smart-space-goes-to-end t)
                       (eshell-smart-initialize)))))
 
+(defun eshell-goto-current-dir (&optional arg)
+  (interactive "P")
+  (let ((dir default-directory))
+    (eshell arg)
+    (eshell/cd dir)))
+(bind-key "C-c S" #'eshell-goto-current-dir)
+
 (use-package shell
   :defer t
   :config (define-key shell-mode-map