0

在终端中,我可以通过 Ctrl-U 擦除整个输入,而无需调用它。Eshell中有这样的命令吗?

4

1 回答 1

1

您正在寻找eshell-kill-input,默认情况下绑定到C-c C-u

我不认为eshell本机支持杀死整个输入字符串(它只杀死点和提示之间的文本),但一些建议应该注意这一点:

;;; For Emacs 24.4 and later
(defun eshell-kill-input--go-to-eol ()
  "Go to end of line before killing input"
  (end-of-line))

(advice-add 'eshell-kill-input :before #'eshell-kill-input--go-to-eol)

;;; For Emacs versions before 24.4
(defadvice eshell-kill-input (before go-to-eol ())
  "Go to end of line before killing input"
  (end-of-line))
于 2014-11-29T14:12:41.213 回答