jethrokuan / fzf

Ef-🐟-ient fish keybindings for fzf
MIT License
861 stars 66 forks source link

Keybindings not working anymore with vi or hybrid bindings #171

Closed ybc37 closed 3 years ago

ybc37 commented 3 years ago

Hi!

Since 3fb7ed9, the keybindings are no longer set up in certain cases:

Sorry for not sending a PR directly, but I don't have much time right now and also thinking about just using fzf built-in fish integration anyway :) I hope the issue helps anyway and maybe I'll submit a PR at some point.

jorgebucaran commented 3 years ago

@ybc37 I'd be happy to revert 3fb7ed9, but I need @rodrigobdz's input first to find out what happened here.

rodrigobdz commented 3 years ago

@jorgebucaran Sure, let me check this out and I'll get back to you later today

rodrigobdz commented 3 years ago

Alright, I get @ybc37's point that the if-condition is only checking for fish_vi_key_bindings to be set and not for fish_hybrid_key_bindings, which are the two possible cases in which the if-condition should be evaluated to true.

Thus, the correct if-condition in this case should check if any non-default keybinding is used. My proposal:

- if test "$fish_key_bindings" = fish_vi_key_bindings
+ if ! test "$fish_key_bindings" = fish_default_key_bindings
jorgebucaran commented 3 years ago

Want to send another PR?

rodrigobdz commented 3 years ago

Please help review the PR above

ybc37 commented 3 years ago

Thanks so much @rodrigobdz and @jorgebucaran!