summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-03-30 10:15:05 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-03-30 10:15:05 +0900
commit1c65139888f7dd971d93a2c1210cd634e1ef12f4 (patch)
treebd98382c90d21c41277d0b87c4b1190e1dd09901 /README.md
parent8a4db3c0041c35ca195468c779d42829d7dabe59 (diff)
Update git ls-tree example (close #168)
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 3 insertions, 12 deletions
diff --git a/README.md b/README.md
index 55a5ea4c..d5e58ced 100644
--- a/README.md
+++ b/README.md
@@ -423,18 +423,9 @@ If you're running fzf in a large git repository, `git ls-tree` can boost up the
speed of the traversal.
```sh
-# Copy the original fzf function to __fzf
-declare -f __fzf > /dev/null ||
- eval "$(echo "__fzf() {"; declare -f fzf | \grep -v '^{' | tail -n +2)"
-
-# Use git ls-tree when possible
-fzf() {
- if [ -n "$(git rev-parse HEAD 2> /dev/null)" ]; then
- FZF_DEFAULT_COMMAND="git ls-tree -r --name-only HEAD" __fzf "$@"
- else
- __fzf "$@"
- fi
-}
+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'
```
#### Using fzf with tmux panes