From 6ce4aa99a7ea9a7996b971e38c83a56e4bab82af Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 2 Jun 2013 20:20:17 +0100 Subject: Emacs: add function and keybinding for opening eshell in the current directory --- emacs/init.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'emacs') diff --git a/emacs/init.el b/emacs/init.el index e88c923..96d105e 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 -- cgit 1.4.1