jethrokuan / fzf

Ef-🐟-ient fish keybindings for fzf
MIT License
863 stars 65 forks source link

Error with new keybindings #135

Closed stefanfrede closed 4 years ago

stefanfrede commented 4 years ago

Since yesterday I get the following error if I use the new keybindings:

❯ fish: Unknown command --color
- (line 3): 
  --color dark,hl:33,hl+:37,fg+:235,bg+:136,fg+:254
  ^
from sourcing file -
    called on line 61 of file /usr/local/Cellar/fish/3.0.2/share/fish/functions/eval.fish

in function 'eval'
    called on line 15 of file ~/.config/fish/functions/__fzf_find_file.fish

in function '__fzf_find_file'
    called on standard input

fish: Unknown command --color
- (line 4): 
  --color info:254,prompt:37,spinner:108,pointer:235,marker:235
  ^
from sourcing file -
    called on line 61 of file /usr/local/Cellar/fish/3.0.2/share/fish/functions/eval.fish

in function 'eval'
    called on line 15 of file ~/.config/fish/functions/__fzf_find_file.fish

in function '__fzf_find_file'
    called on standard input

fish: Unknown command --query
- (line 5): 
  --query "" 
  ^
from sourcing file -
    called on line 61 of file /usr/local/Cellar/fish/3.0.2/share/fish/functions/eval.fish

in function 'eval'
    called on line 15 of file ~/.config/fish/functions/__fzf_find_file.fish

in function '__fzf_find_file'
    called on standard input

I sadly have no clue what changed but besides the above error I also have the phenomenon that all keybindings stopped working in tmux.

I'm on macOS 10.15.2 and I use the Terminal.app.

jethrokuan commented 4 years ago

Can you help me check the output of the following:

  1. __fzfcmd
  2. echo $FZF_DEFAULT_OPTS
  3. echo $FZF_FIND_FILE_OPTS

I think __fzfcmd is returning something weird for you.

stefanfrede commented 4 years ago
__fzfcmd
fzf-tmux -d40%
echo $FZF_DEFAULT_OPTS

--color dark,hl:33,hl+:37,fg+:235,bg+:136,fg+:254
--color info:254,prompt:37,spinner:108,pointer:235,marker:235
echo $FZF_FIND_FILE_OPTS

I hope this is helping.

jethrokuan commented 4 years ago

what's happening is that your $FZF_DEFAULT_OPTS contains some newlines. Running:

set -U FZF_DEFAULT_OPTS "--color dark,hl:33,hl+:37,fg+:235,bg+:136,fg+:254 --color info:254,prompt:37,spinner:108,pointer:235,marker:235"

should fix things.

stefanfrede commented 4 years ago

Thanks a lot 👍