Bash 设置 vi mode
bash shell在行模式编辑内容时,模式为emacs的操作模式
查看 readline 的 man 手册内容如下
$ man readline
...
editing-mode (emacs)
Controls whether readline begins with a set of key bindings similar to Emacs or vi.
editing-mode can be set to either emacs or vi.
keymap (emacs)
Set the current readline keymap.
The set of legal keymap names is emacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move, vi-command, and vi-insert.
vi is equivalent to vi-command; emacs is equivalent to emacs-standard.
The default value is emacs. The value of editing-mode also affects the default keymap.
编辑 $HOME/.inputrc
vim $HOME/.inputrc
## author: colinx
#
$include /etc/inputrc
set editing-mode vi
set keymap vi
标签:set,vi,keymap,emacs,mode,readline,Bash
From: https://www.cnblogs.com/xiexienio/p/18415075