fzf.sh 493 B

123456789101112
  1. # Fuzzy Finder in Go/Ruby
  2. if [[ -x $(command -v ag 2>/dev/null) ]]; then
  3. # Setting ag as the default source for fzf
  4. export FZF_DEFAULT_COMMAND='ag -l -g ""'
  5. else
  6. # Otherwise at least use `git ls-tree` if available.
  7. export FZF_DEFAULT_COMMAND='(git ls-tree -r --name-only HEAD || find * -name ".*" -prune -o -type f -print -o -type l -print) 2>/dev/null'
  8. fi
  9. # To apply the command to CTRL-T as well (paste selection into command line)
  10. export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"