fzf.sh 500 B

1234567891011121314
  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='
  8. (git ls-tree -r --name-only HEAD ||
  9. find * -name ".*" -prune -o -type f -print -o -type l -print) 2>/dev/null'
  10. fi
  11. # To apply the command to CTRL-T as well (paste selection into command line)
  12. export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"