sudo vi /etc/inputrc
大约在第40行,找到"page up" and "page down"的用法,去掉前面的#号,重启终端即可:
40 # alternate mappings for "page up" and "page down" to search the history
41 "\e[5~": history-search-backward42 "\e[6~": history-search-forward
通过编辑sudovi/etc/inputrc文件,取消第40行关于pageup和pagedown的注释,将e[5~映射到history-search-backward,e[6~映射到history-search-forward,然后重启终端,可以使用PageUp和PageDown键在命令历史中进行搜索。
sudo vi /etc/inputrc
大约在第40行,找到"page up" and "page down"的用法,去掉前面的#号,重启终端即可:
40 # alternate mappings for "page up" and "page down" to search the history
41 "\e[5~": history-search-backward42 "\e[6~": history-search-forward
2万+
6157
6359
473
1645

被折叠的 条评论
为什么被折叠?