Zsh-autocomplete: Don't override ↑ and ↓ bindings when fzf is installed

Created on 17 Jun 2020  Â·  4Comments  Â·  Source: marlonrichert/zsh-autocomplete

Is your feature request related to a problem? Please describe.

Currently, if fzf is installed, zsh-autocomplete will rebind ↑ so that it no longer toggles through history, but fuzzy searches through it.

For my usage this seems unnecessary, since ^+R already activates fuzzy search, and ↑ is a convenient well-known shortcut to repeat the last few commands.

Describe the solution you'd like

Either disable the automatic remapping of ↑ when fzf is detected or offer an option to bring it back to its original functionality.


Again, thanks for the great work!

Feature request

Most helpful comment

I agree with you.

this is the workaround.

function precmd_remove_up_down_bindkey() {
  bindkey '^[OA' up-line-or-history
  bindkey '^[OB' down-line-or-history
}

autoload -Uz add-zsh-hook
add-zsh-hook precmd precmd_remove_up_down_bindkey

All 4 comments

I agree with you.

this is the workaround.

function precmd_remove_up_down_bindkey() {
  bindkey '^[OA' up-line-or-history
  bindkey '^[OB' down-line-or-history
}

autoload -Uz add-zsh-hook
add-zsh-hook precmd precmd_remove_up_down_bindkey

Another comment would be to suppress completions when using up-line-or-history. When I move back in history and am modifying commands, it would be good to hold off on showing completions until I start typing or something.

@dylanjm I actually have implemented that already in my local copy of the dev branch. You can expect to see it soon.

Merged to master.

Was this page helpful?
0 / 5 - 0 ratings