Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CTRL + R not working #4294

Open
sudhanya-jaisingh opened this issue Feb 27, 2025 · 4 comments
Open

CTRL + R not working #4294

sudhanya-jaisingh opened this issue Feb 27, 2025 · 4 comments
Labels
invalid: missing template Issue template not filled in

Comments

@sudhanya-jaisingh
Copy link

I am a MAC M1 user and the CTRL+R option was working fine until a few days back when it suddenly stopped working.

My fzf version is 0.60.2 (brew)
And shell is interactive and I get the following response upon using 'bindkey | grep fzf'

"^I" fzf-completion
"^R" fzf-history-widget
"^T" fzf-file-widget
"^[c" fzf-cd-widget

If I use fzf-history-widget alone I get 'widgets can only be called when ZLE is active'. My CTRL+T is working fine but this history thing

@junegunn junegunn added the invalid: missing template Issue template not filled in label Feb 27, 2025
@junegunn
Copy link
Owner

How do you set up shell integration? Are you following the instruction in https://github.com/junegunn/fzf?tab=readme-ov-file#setting-up-shell-integration?

@sudhanya-jaisingh
Copy link
Author

Yeah I have used the source <(fzf --zsh) line in my zshrc file

@LangLangBart
Copy link
Contributor

Can you try to reproduce your bug in a minimal zsh environment?

command env -i "HOME=$HOME" "USER=$USER" "PATH=$PATH" "TERM=$TERM" zsh -f

source <(fzf --zsh)

# press ctrl-r

If you don't see the error, that suggests something in your shell setup is interfering with the
correct functioning of the fzf widgets. One way to troubleshoot is to gradually remove parts of your
shell setup or make your setup public so we can identify where things go wrong.

@hahapigs
Copy link

hahapigs commented Mar 7, 2025

#1920
#4211

I encountered the same problem and, after extensive testing, I think I found the issue.

When I open a new terminal window and execute bindkey, it initially shows "^R" fzf-history-widget. However, after a few seconds, when I run bindkey again, it shows "^R" history-incremental-search-backward. I suspect this may be related to the loading order of some Zsh plugins. I have tried different installation methods including brew install fzf and git。

I temporarily did this by delaying it to load last, for example, after the year 2000...

zinit ice if"[[ -n '$TMUX' ]] || [[ '$TERM_PROGRAM' != 'WarpTerminal' ]]" wait"6" lucid from="gh-r" as"program" atload"source <(fzf --zsh); bindkey '^R' fzf-history-widget; bindkey '^T' fzf-file-widget"
zinit light junegunn/fzf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid: missing template Issue template not filled in
Projects
None yet
Development

No branches or pull requests

4 participants