Skip to content

Instantly share code, notes, and snippets.

@bspaulding
Last active July 8, 2016 21:03
Show Gist options
  • Select an option

  • Save bspaulding/387551e496b545df25fba23457860f64 to your computer and use it in GitHub Desktop.

Select an option

Save bspaulding/387551e496b545df25fba23457860f64 to your computer and use it in GitHub Desktop.
# fzf default command
# prefer git ls-tree/ls-files, then ag, then find if needed
# cat'ing ls-tree and ls-files because ls-tree doesn't know about
# untracked files
export FZF_DEFAULT_COMMAND='
({ git ls-tree -r --name-only HEAD ; git ls-files . --exclude-standard --others } ||
ag -g "" --ignore node_modules ||
find . -path "*/\.*" -prune -o -type f -print -o -type l -print |
sed s/^..//) 2> /dev/null'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment