Fzf: [fish] FZF_DEFAULT_OPTS not exported

Created on 13 Sep 2017  ·  3Comments  ·  Source: junegunn/fzf

  • Category

    • [ ] fzf binary

    • [ ] fzf-tmux script

    • [ ] Key bindings

    • [ ] Completion

    • [ ] Vim

    • [ ] Neovim

    • [x] Etc.

  • OS

    • [ ] Linux

    • [ x Mac OS X

    • [ ] Windows

    • [ ] Windows Subsystem for Linux

    • [ ] Etc.

  • Shell

    • [ ] bash

    • [ ] zsh

    • [x] fish

I have the following in my ~/.config/omf/init.fish:

export FZF_DEFAULT_OPTS='
  --color=bg+:#20242b,bg:#20242b
  --color=hl+:#61afef,hl:#61afef
  --color=fg+:#abb2bf,fg:#636d83
  --color=info:#98c379,prompt:#98c379,spinner:#98c379,pointer:#e06c75,marker:#61afef'

It works just fine within .bashrc and .zshrc, I'm not sure what I'm missing. Thanks!

question

Most helpful comment

i think its because export in fish shell does not work with multilines. if i use set -x it works as expected.

~ ❯ set -gx FZF_DEFAULT_OPTS '                                                                                                                                               
      --color=bg+:#20242b,bg:#20242b
      --color=hl+:#61afef,hl:#61afef
      --color=fg+:#abb2bf,fg:#636d83
      --color=info:#98c379,prompt:#98c379,spinner:#98c379,pointer:#e06c75,marker:#61afef'
~ ❯ echo $FZF_DEFAULT_OPTS                                                                                                                                                   

  --color=bg+:#20242b,bg:#20242b
  --color=hl+:#61afef,hl:#61afef
  --color=fg+:#abb2bf,fg:#636d83
  --color=info:#98c379,prompt:#98c379,spinner:#98c379,pointer:#e06c75,marker:#61afef

compare that to

~ ❯ echo $FZF_DEFAULT_OPTS                                                                                                                                                   

~ ❯ export FZF_DEFAULT_OPTS='                                                                                                                                                
      --color=bg+:#073642,bg:#002b36,spinner:#719e07,hl:#586e75
      --color=fg:#FFFFFF,header:#586e75,info:#cb4b16,pointer:#719e07
      --color=marker:#719e07,fg+:#839496,prompt:#719e07,hl+:#719e07
    '
~ ❯ echo $FZF_DEFAULT_OPTS

All 3 comments

this doesn't work for me in fish as well, however it works if I directly pass the color option in the command

fzf --color=bg+:#20242b,bg:#20242b --color=hl+:#61afef,hl:#61afef --color=fg+:#abb2bf,fg:#636d83 --color=info:#98c379,prompt:#98c379,spinner:#98c379,pointer:#e06c75,marker:#61afef

screenshot 2017-09-14 15 33 38

i think its because export in fish shell does not work with multilines. if i use set -x it works as expected.

~ ❯ set -gx FZF_DEFAULT_OPTS '                                                                                                                                               
      --color=bg+:#20242b,bg:#20242b
      --color=hl+:#61afef,hl:#61afef
      --color=fg+:#abb2bf,fg:#636d83
      --color=info:#98c379,prompt:#98c379,spinner:#98c379,pointer:#e06c75,marker:#61afef'
~ ❯ echo $FZF_DEFAULT_OPTS                                                                                                                                                   

  --color=bg+:#20242b,bg:#20242b
  --color=hl+:#61afef,hl:#61afef
  --color=fg+:#abb2bf,fg:#636d83
  --color=info:#98c379,prompt:#98c379,spinner:#98c379,pointer:#e06c75,marker:#61afef

compare that to

~ ❯ echo $FZF_DEFAULT_OPTS                                                                                                                                                   

~ ❯ export FZF_DEFAULT_OPTS='                                                                                                                                                
      --color=bg+:#073642,bg:#002b36,spinner:#719e07,hl:#586e75
      --color=fg:#FFFFFF,header:#586e75,info:#cb4b16,pointer:#719e07
      --color=marker:#719e07,fg+:#839496,prompt:#719e07,hl+:#719e07
    '
~ ❯ echo $FZF_DEFAULT_OPTS

@deepredsky works!! thanks! need to learn me some fish..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nordlow picture nordlow  ·  3Comments

firedev picture firedev  ·  3Comments

sassanh picture sassanh  ·  3Comments

leonklingele picture leonklingele  ·  3Comments

fenuks picture fenuks  ·  3Comments