0

I'm trying to configure rg and fzf on my mac, but really cannot work out how to clear out lots of annoying files from search.

I have a ~/.gitignore with the following:

Library/*
Music/*

(and I also tried without the '*' at the end of the line)

and my zshrc looks like this:

export FZF_DEFAULT_COMMAND='rg --files --hidden'

I've also tried putting globs in ~/.ignore and ~/.config/git/ignore. In every case, I always end up with loads of Library/ and Music/ matches.

Any help would be appreciated!! Thank you.

EDIT

With some further Googling I've discovered that it's actually not FZF that isn't working - it's that I'm using Ctrl+T to open fzf. If I type fzf it works as expected.

So the question now is how I can get Ctrl+T to have the correct behaviour.

Raph117
  • 3,441
  • 7
  • 29
  • 50

1 Answers1

0

After examining the source code, my hackish answer to this is to add:

export FZF_CTRL_T_COMMAND=$FZF_DEFAULT_COMMAND

to my .zshrc after oh my zsh is sourced.

Hope this helps!

feoh
  • 1,281
  • 1
  • 14
  • 19