Work around 'wildignore'

Closes #5.
This commit is contained in:
Tim Pope 2012-12-05 13:12:39 -05:00
parent 1bda41a59f
commit 17e3eeb2c6
2 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ function! classpath#from_vim(path) abort
if elem ==# ''
let path += ['.']
else
let path += split(glob(substitute(elem, '\\\ze[\\ ,]', '', 'g')), "\n")
let path += split(glob(substitute(elem, '\\\ze[\\ ,]', '', 'g'), 1), "\n")
endif
endfor
return join(path, classpath#separator())

View File

@ -47,14 +47,14 @@ endfunction
function! foreplay#ns_complete(A, L, P) abort
let matches = []
for pattern in split(&path, ',')
for dir in split(glob(pattern), "\n")
for dir in split(glob(pattern, 1), "\n")
if dir =~# '\.jar$' && executable('zipinfo')
let files = split(system('zipinfo -1 '.shellescape(dir).' "*.clj"'), "\n")
if v:shell_error
let files = []
endif
else
let files = split(glob(dir."/**/*.clj"), "\n")
let files = split(glob(dir."/**/*.clj", 1), "\n")
call map(files, 'v:val[strlen(dir)+1 : -1]')
endif
let matches += files