我试图搜索我的bash历史类似于CTRL-r,但转发方向。
这是一个痛苦的我,当我只是打了一次太频繁CTRL-r,再次找到上一个命令。
你如何向前搜索你的Bash历史,类似反向搜索?
您也可以向前搜索。从bash信息手册“
8.2.5 Searching for Commands in the History”:
To search backward in the history for a particular string,type
C-r
.
TypingC-s
searches forward through the history.
然而,Ctrl-S的问题是,有时会与XON / XOFF流控制(例如在Konsole中)冲突。然而,搜索是一个readline功能,你应该能够绑定到一些其他的键。更新:更简单更好只是通过运行禁用XON / XOFF
stty -ixon