答案1
该行为是命令的一部分fzf
。您可以按照本指南操作:fzf - 命令行模糊查找器将其安装到您的操作系统上。就我而言(安装后)我必须获取这些文件:
source /usr/share/bash-completion/completions/fzf
source /usr/share/bash-completion/completions/fzf-key-bindings
在其他情况下,可能会从不同的路径获取文件:
source /usr/share/doc/fzf/examples/completion.bash
source /usr/share/doc/fzf/examples/key-bindings.bash
如果您想避免每次都输入这些命令,您可以将这些行添加到您的~/.bashrc
or 中~/.bash_profile
:
echo -e 'source /usr/share/bash-completion/completions/fzf\nsource /usr/share/bash-completion/completions/fzf-key-bindings' >> ~/.bashrc
echo -e 'source /usr/share/bash-completion/completions/fzf\nsource /usr/share/bash-completion/completions/fzf-key-bindings' >> ~/.bash_profile