Leverage classpath#split from ns completion
This commit is contained in:
parent
17e3eeb2c6
commit
8865fcbb23
@ -46,8 +46,7 @@ endfunction
|
||||
|
||||
function! foreplay#ns_complete(A, L, P) abort
|
||||
let matches = []
|
||||
for pattern in split(&path, ',')
|
||||
for dir in split(glob(pattern, 1), "\n")
|
||||
for dir in classpath#split(classpath#from_vim(&path))
|
||||
if dir =~# '\.jar$' && executable('zipinfo')
|
||||
let files = split(system('zipinfo -1 '.shellescape(dir).' "*.clj"'), "\n")
|
||||
if v:shell_error
|
||||
@ -59,7 +58,6 @@ function! foreplay#ns_complete(A, L, P) abort
|
||||
endif
|
||||
let matches += files
|
||||
endfor
|
||||
endfor
|
||||
return filter(map(matches, 's:tons(v:val)'), 'a:A ==# "" || a:A ==# v:val[0 : strlen(a:A)-1]')
|
||||
endfunction
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user