在bash shell中,我可以使用向上箭头键导航到先前输入的命令.但这在emacs shell模式下不起作用.有没有办法实现这个?
将此添加到您的~/.emacs:
(define-key comint-mode-map (kbd "<up>") 'comint-previous-input)
(define-key comint-mode-map (kbd "<down>") 'comint-next-input)
Run Code Online (Sandbox Code Playgroud)