diff options
author | Alan Pearce | 2013-06-02 20:20:17 +0100 |
---|---|---|
committer | Alan Pearce | 2013-06-02 20:20:17 +0100 |
commit | 6ce4aa99a7ea9a7996b971e38c83a56e4bab82af (patch) | |
tree | e921c59a6d64d1f31320930db3666adae58c08fd /emacs | |
parent | 954a691139a1756af64e2db7091c6ea66cb92fe9 (diff) | |
download | dotfiles-6ce4aa99a7ea9a7996b971e38c83a56e4bab82af.tar.lz dotfiles-6ce4aa99a7ea9a7996b971e38c83a56e4bab82af.tar.zst dotfiles-6ce4aa99a7ea9a7996b971e38c83a56e4bab82af.zip |
Emacs: add function and keybinding for opening eshell in the current directory
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/init.el | 7 |
1 files changed, 7 insertions, 0 deletions
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 |