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 ==# '' if elem ==# ''
let path += ['.'] let path += ['.']
else else
let path += split(glob(substitute(elem, '\\\ze[\\ ,]', '', 'g')), "\n") let path += split(glob(substitute(elem, '\\\ze[\\ ,]', '', 'g'), 1), "\n")
endif endif
endfor endfor
return join(path, classpath#separator()) return join(path, classpath#separator())

View File

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