Sem*_*ime 5 search bash zsh command-history
[CTRL]+[r]将打开reverse-i-search提示符。注意:搜索查询将仅命中完整命令的中间,而不是正常 zsh 搜索所需的开头匹配。
要使zsh在按 时表现得像 bash[CTRL]+[r]:
# for non-pattern search like in bash
bindkey "^R" history-incremental-search-backward`
Run Code Online (Sandbox Code Playgroud)
或者
# for pattern search (the wildcard `*` will use zsh completion)
bindkey "^R" history-incremental-pattern-search-backward
Run Code Online (Sandbox Code Playgroud)
注意:将该行添加到您的~/.zshrc以使其永久化。
| 归档时间: |
|
| 查看次数: |
4756 次 |
| 最近记录: |