Fzf: Key bindings working but errors shown

Created on 17 Feb 2017  路  3Comments  路  Source: junegunn/fzf

  • Category

    • [ ] fzf binary

    • [ ] fzf-tmux script

    • [x] Key bindings

    • [ ] Completion

    • [ ] Vim

    • [ ] Neovim

    • [ ] Etc.

  • OS

    • [ ] Linux

    • [x] Mac OS X

    • [ ] Windows

    • [ ] Windows Subsystem for Linux

    • [ ] Etc.

  • Shell

    • [ ] bash

    • [x] zsh

    • [ ] fish

Getting errors after running the command for key bindings:

/usr/local/opt/fzf/shell/key-bindings.bash:70: command not found: bind
/usr/local/opt/fzf/shell/key-bindings.bash:71: command not found: bind
/usr/local/opt/fzf/shell/key-bindings.bash:[:74: unknown condition: -gt
/usr/local/opt/fzf/shell/key-bindings.bash:79: command not found: bind
/usr/local/opt/fzf/shell/key-bindings.bash:83: command not found: bind
/usr/local/opt/fzf/shell/key-bindings.bash:86: command not found: bind

I run the command /usr/local/opt/fzf/install, answer yes to all the questions, no errors. I restart the shell, the key bindings work, but first thing that gets printed are the errors above.

invalid

Most helpful comment

Looks like your zsh config is loading ~/.bashrc, which is not syntactically compatible. I recommend that you don't do that, but it you insist, you can edit the line in .bashrc so that it's not loaded under zsh.

[ -z "$ZSH_NAME" ] && [ -f ~/.fzf.bash ] && source ~/.fzf.bash

All 3 comments

Looks like your zsh config is loading ~/.bashrc, which is not syntactically compatible. I recommend that you don't do that, but it you insist, you can edit the line in .bashrc so that it's not loaded under zsh.

[ -z "$ZSH_NAME" ] && [ -f ~/.fzf.bash ] && source ~/.fzf.bash

Yes, it looks like I was sourcing .bashrc in my .bash_profile which was then sourced in .zshrc. A big mess indeed. Thank you for your help.

Fixed it for me as well, thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jan-warchol picture jan-warchol  路  3Comments

sandric picture sandric  路  3Comments

asilvadesigns picture asilvadesigns  路  3Comments

erusev picture erusev  路  3Comments

lbeier picture lbeier  路  3Comments