fzf:ctlr-r 未触发命令行上的历史搜索

fzf:ctlr-r 未触发命令行上的历史搜索

我已经在 debian 11 (bullseye) 上安装了 fzf。当我输入 ctrl-r 来触发历史搜索时,没有任何反应。在我的 Mac 上运行良好。我正在使用 zsh。

更新:尝试添加bindkey '^r' fzf-history-widget到 .zshrc 但我只是收到“没有这样的小部件”错误。

fzf --版本报告 0.24(开发)

答案1

好的,在以下位置找到了答案https://packages.debian.org/bullseye/fzf其中说要参考 README 文件:

Bash
====

Append this line to ~/.bashrc to enable fzf keybindings for Bash:

   source /usr/share/doc/fzf/examples/key-bindings.bash

Append this line to ~/.bashrc to enable fuzzy auto-completion for Bash:

   source /usr/share/doc/fzf/examples/completion.bash

Zsh
===

Append this line to ~/.zshrc to enable fzf keybindings for Zsh:

   source /usr/share/doc/fzf/examples/key-bindings.zsh

Append this line to ~/.zshrc to enable fuzzy auto-completion for Zsh:

   source /usr/share/doc/fzf/examples/completion.zsh

Fish
====

Issue the following commands to enable fzf keybindings for Fish:

   mkdir -p ~/.config/fish/functions/
   echo fzf_key_bindings > ~/.config/fish/functions/fish_user_key_bindings.fish

Vim
===

The straightforward way to use fzf.vim is appending this line to your vimrc:

   source /usr/share/doc/fzf/examples/fzf.vim

答案2

这个插件也可以通过zinitoh-my-zsh https://github.com/joshskidmore/zsh-fzf-history-search

答案3

这可能与此堆栈交换无关,但在 M1 mac 上,我key-bindings.zsh在以下位置找到了该文件:/opt/homebrew/Cellar/fzf/0.36.0/shell/key-bindings.zsh

通过将此文件添加到我的文件中,我.zshrc能够Ctrl使用.rfzf

相关内容