From 1d6df486ec06c8eed1894e928432543dc6c3df87 Mon Sep 17 00:00:00 2001 From: james sangho nah Date: Wed, 20 Jan 2016 00:18:17 +1300 Subject: [PATCH] Quit shell only if there is no char left to delete Addressing #4630. C-d is now bound to eshell-delchar-or-maybe-eof which checks if there is a char after the point. If so, it performs the normal delete-char, otherwise eshell-life-is-too-much. --- layers/shell/packages.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layers/shell/packages.el b/layers/shell/packages.el index cd24c2ec6..5368632d3 100644 --- a/layers/shell/packages.el +++ b/layers/shell/packages.el @@ -118,10 +118,11 @@ is achieved by adding the relevant text properties." (eshell-send-input)) ;; Caution! this will erase buffer's content at C-l + (require 'em-rebind) (add-hook 'eshell-mode-hook #'(lambda () (define-key eshell-mode-map (kbd "C-l") 'eshell/clear) - (define-key eshell-mode-map (kbd "C-d") 'eshell-life-is-too-much))) + (define-key eshell-mode-map (kbd "C-d") 'eshell-delchar-or-maybe-eof))) (add-hook 'eshell-mode-hook 'spacemacs//init-eshell)) :config (progn