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

Option to disable Ctrl+R bindings (bash) #4111

Open
5 of 10 tasks
hahnandrew opened this issue Nov 27, 2024 · 1 comment
Open
5 of 10 tasks

Option to disable Ctrl+R bindings (bash) #4111

hahnandrew opened this issue Nov 27, 2024 · 1 comment

Comments

@hahnandrew
Copy link

Checklist

  • I have read through the manual page (man fzf)
  • I have searched through the existing issues
  • For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version

0.56.1 (brew)

OS

  • Linux
  • macOS
  • Windows
  • Etc.

Shell

  • bash
  • zsh
  • fish

Problem / Steps to reproduce

Reference #3678

Ctrl-r conflicts with bash's reverse-search-history (C-r). FZF doesn't have an option to disable this binding

Add an option to skip fzf's Ctrl-r binding by setting a variable to an empty string, ie

FZF_CTRL_R_COMMAND= eval "$(fzf --zsh)"

@junegunn
Copy link
Owner

All the bindings override the default bash ones. But the important difference is that ALT-C and CTRL-T change the default behavior (capitalize-word, transpose-chars) but CTRL-R enhances the default reverse-search-history, so few want to turn it off (CTRL-R is one of the most loved features of fzf). Also, there is currently no FZF_CTRL_R_COMMAND, so introducing it just for disabling CTRL-R doesn't seem ideal.

If you do want the original reverse-search-history over the fzf's one, you can easily restore it like so:

eval "$(fzf --bash)"
bind '"\C-r": reverse-search-history'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants