diff --git a/oni-eshell.el b/oni-eshell.el index 7f8e9ed..71f1e31 100644 --- a/oni-eshell.el +++ b/oni-eshell.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2020.1026.133507 +;; Version: 2020.1106.164034 ;; Package-Requires: (eshell-fringe-status esh-autosuggest xterm-color eshell-syntax-highlighting) ;; This program is free software; you can redistribute it and/or modify @@ -56,9 +56,10 @@ (setq eshell-output-filter-functions (remove 'eshell-handle-ansi-color eshell-output-filter-functions))) -(defun oni-eshell--set-eshell-C-d () +(defun oni-eshell--expand-keymap () "Set `C-d' to quit eshell if used at end of prompt." - (define-key eshell-mode-map (kbd "C-d") #'oni-eshell--C-d)) + (define-key eshell-mode-map (kbd "C-d") #'oni-eshell--C-d) + (define-key eshell-mode-map (kbd "C-c b") #'oni-eshell-goto-buffer-directory)) (defun oni-eshell--set-xterm-variables () "Set ‘xterm-color-preserve-properties’ to t." @@ -81,7 +82,7 @@ (eshell-reset)) (add-hook 'eshell-before-prompt-hook #'oni-eshell--set-xterm-variables) -(add-hook 'eshell-first-time-mode-hook #'oni-eshell--set-eshell-C-d) +(add-hook 'eshell-first-time-mode-hook #'oni-eshell--expand-keymap) (add-hook 'eshell-load-hook #'oni-eshell--disable-ansi-color-handling) (add-hook 'eshell-load-hook #'oni-eshell--enable-truncating-buffers) (add-hook 'eshell-load-hook #'oni-eshell--enable-xterm-filter) @@ -91,8 +92,6 @@ (add-hook 'esh-autosuggest-mode-hook #'oni-eshell-fix-esh-autosuggest-active-keymap) -(define-key eshell-mode-map (kbd "C-c b") #'oni-eshell-goto-buffer-directory) - (when (display-graphic-p) (add-hook 'eshell-mode-hook 'eshell-fringe-status-mode))