-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfuf.patch
22 lines (21 loc) · 825 Bytes
/
fuf.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/fuzzyfinder/autoload/fuf.vim b/fuzzyfinder/autoload/fuf.vim
index fe9e6eb..9c43758 100644
--- a/fuzzyfinder/autoload/fuf.vim
+++ b/fuzzyfinder/autoload/fuf.vim
@@ -18,7 +18,16 @@ endif
function fuf#glob(expr)
" Substitutes "\", because on Windows, "**\" doesn't include ".\",
" but "**/" include "./". I don't know why.
- return split(glob(substitute(a:expr, '\', '/', 'g')), "\n")
+ call system('which find')
+ if v:shell_error == 0
+ if strlen(&wildignore) == 0
+ return split(system('find -L .'), "\n")
+ else
+ return split(system('find -L . \( '.join(map(split(&wildignore,','), '"-name \"".substitute(v:val, "/\\*\\|\\*/", "", "g")."\""'), ' -o ').' \) -prune -o -print'), "\n")
+ end
+ else
+ return split(glob(substitute(a:expr, '\', '/', 'g')), "\n")
+ end
endfunction
"