Use jar command if available to query zip files

This commit is contained in:
Tim Pope 2015-06-21 13:43:22 -04:00
parent 89aee9c00c
commit 09eedd05af

View File

@ -41,6 +41,8 @@ function! fireplace#jar_contents(path) abort
if !exists('s:zipinfo')
if executable('zipinfo')
let s:zipinfo = 'zipinfo -1 '
elseif executable('jar')
let s:zipinfo = 'jar tf '
elseif executable('python')
let s:zipinfo = 'python -c '.shellescape('import zipfile, sys; print chr(10).join(zipfile.ZipFile(sys.argv[1]).namelist())').' '
else