Fzf: $FZF_DEFAULT_COMMAND not respected in fish shell

Created on 11 Dec 2017  路  3Comments  路  Source: junegunn/fzf

  • Category

    • [x] fzf binary

    • [ ] fzf-tmux script

    • [ ] Key bindings

    • [ ] Completion

    • [ ] Vim

    • [ ] Neovim

    • [ ] Etc.

  • OS

    • [ ] Linux

    • [x] Mac OS X

    • [ ] Windows

    • [ ] Windows Subsystem for Linux

    • [ ] Etc.

  • Shell

    • [ ] bash

    • [ ] zsh

    • [x] fish


I'm unable to get fzf to respect $FZF_DEFAULT_COMMAND when using fish.
In my fish config, I set FZF_DEFAULT_COMMAND to a ripgrep-command for listing files. When I run fzf either using fzf or with a keybinding it lists everything as usual, ignoring the variable.
Echoing the variable shows that it has been set.
Running the ripgrep-command manually and piping it to fzf works.

Everything works as expected in bash.

Any pointers for how one would achieve this? Or is it an actal bug?

invalid question

Most helpful comment

it does not work through the shortcut such like ctrl + t

All 3 comments

Works for me just fine

jg@junegunn /p/tmp> env FZF_DEFAULT_COMMAND='echo foo' fzf --filter foo
foo
jg@junegunn /p/tmp> env FZF_DEFAULT_COMMAND='echo bar' fzf --filter foo
jg@junegunn /p/tmp>

Make sure to export the variable (-x).

Yep, -x did it 馃槗
You have no idea for how long I've tried to understand/fix this.
Thank you so much for this and for fzf!

it does not work through the shortcut such like ctrl + t

Was this page helpful?
0 / 5 - 0 ratings

Related issues

erusev picture erusev  路  3Comments

sassanh picture sassanh  路  3Comments

sandric picture sandric  路  3Comments

jan-warchol picture jan-warchol  路  3Comments

lbeier picture lbeier  路  3Comments