Ctrl+r search seems to overridden
xconverge opened this issue · comments
Before proceeding...
- My CLIs meet the minimum version requirements
- I have read through the troubleshooting guide
- If I updated fzf.fish for the first time in over 6 months, I read the migration guides to make sure I'm caught up
Describe the bug
I did not have fzf_configure_bindings in my config previously because I never customized anything. Now that fish added a newer default ctrl+r implementation I am unsure how to have the fzf implementation be the default version. I tried putting fzf_configure_bindings in my config but it doesn't work, I need to manually execute fzf_configure_bindings to restore the keybinding for the fzf version.
This doesnt seem to be working for me in the fzf.fish config
# Install the default bindings, which are mnemonic and minimally conflict with fish's preset bindings
fzf_configure_bindings
Steps to reproduce
Install fzf
Install fish 3.6.0+
ctrl+r to use new fish reverse search
fzf_configure_bindings
ctrl+r to use fzf version of reverse search
Environment
Versions installed:
- Fish: 3.6.0
- fzf.fish: latest
Which, if any, configuration variables such as fzf_preview_file_cmd
are set?
Additional context
Hi, yeah that comment is out of date. I did not foresee fish releasing their own reverse-i-search. Now, you need to put fzf_configure_bindings --history=
in your config.fish to use Ctrl+R for the default. fzf_configure_bindings --help
has more info.
FWIW, yesterday I tried the default reverse-i-search and I decided I'll stick with fzf.fish's because it's much better.
Hi, yeah that comment is out of date. I did not foresee fish releasing their own reverse-i-search. Now, you need to put
fzf_configure_bindings --history=
in your config.fish to use Ctrl+R for the default.fzf_configure_bindings --help
has more info.FWIW, yesterday I tried the default reverse-i-search and I decided I'll stick with fzf.fish's because it's much better.
I came to the same conclusion regarding fzf.fish's vs this new one :)
Thanks, will use this in my config!
Sorry, I misunderstood that setting. I want to do the opposite of what --history= is doing
On my system, fzf_configure_bindings in my config is not taking over the default so I am stuck with the default fish implementation, I have to run it manually after startup
On my system, fzf_configure_bindings in my config is not taking over the default so I am stuck with the default fish implementation, I have to run it manually after startup
Oh I see, sorry I misunderstood the issue. Hmmm that is a bug indeed. Let me get back to you...
So when you run bind, do you see bind -M insert \cr _fzf_search_history
several lines below bind --preset \cr history-pager
?
I do not see that exact line, but I do see some \cr entries so I would expect them to be overriden?, I see
bind --preset \cr history-pager
bind --preset \e\ ep fish_clipboard_paste
bind \e\cf _fzf_search_directory
bind \e\cl _fzf_search_git_log
bind \e\cs _fzf_search_git_status
bind \cr fzf-history-widget
bind \e\cp _fzf_search_processes
bind \cv '_fzf_search_variables (set --show | psub) (set --names | psub)'
bind -M insert \e\cf _fzf_search_directory
bind -M insert \e\cl _fzf_search_git_log
bind -M insert \e\cs _fzf_search_git_status
bind -M insert \cr fzf-history-widget
bind -M insert \e\cp _fzf_search_processes
bind -M insert \cv '_fzf_search_variables (set --show | psub) (set --names | psub)'
bind \ct fzf-file-widget
bind \ec fzf-cd-widget
bind -M insert \ct fzf-file-widget
bind -M insert \ec fzf-cd-widget
I see bind -M insert \cr fzf-history-widget
, which comes from a different fzf plugin. The one that ships with fzf. Would recommend uninstalling that. That might be what is overriding fzf.fish's version. See the second line of https://github.com/PatrickF1/fzf.fish/wiki/Troubleshooting#default-or-custom-key-bindings-do-not-work.
I see, this plugin relies on fzf based on the documentation, and I am using homebrew to install https://formulae.brew.sh/formula/fzf which is causing the problems as you mentioned
Does this mean I need to explicitly unbind this from the other instance and figure out how that syntax works?
I looked at the referenced lines you mentioned and cant find an obvious "add this to config to force override" anywhere
I think you probably ran $(brew --prefix)/opt/fzf/install
and that's the issue. You have to uninstall it now: /opt/homebrew/opt/fzf/uninstall
(depending on the output of brew --prefix
)
Great, this seems to work for me, I had done that ages ago, thanks and have a nice day!
No problem! I need to make this more obvious in the docs NOT to install that and how to install it. Learned something today, thanks.