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 に答える