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.
This commit is contained in:
james sangho nah 2016-01-20 00:18:17 +13:00 committed by Eivind Fonn
parent a15f0f940c
commit 1d6df486ec

View file

@ -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