Use jar command if available to query zip files
This commit is contained in:
parent
89aee9c00c
commit
09eedd05af
@ -41,6 +41,8 @@ function! fireplace#jar_contents(path) abort
|
|||||||
if !exists('s:zipinfo')
|
if !exists('s:zipinfo')
|
||||||
if executable('zipinfo')
|
if executable('zipinfo')
|
||||||
let s:zipinfo = 'zipinfo -1 '
|
let s:zipinfo = 'zipinfo -1 '
|
||||||
|
elseif executable('jar')
|
||||||
|
let s:zipinfo = 'jar tf '
|
||||||
elseif executable('python')
|
elseif executable('python')
|
||||||
let s:zipinfo = 'python -c '.shellescape('import zipfile, sys; print chr(10).join(zipfile.ZipFile(sys.argv[1]).namelist())').' '
|
let s:zipinfo = 'python -c '.shellescape('import zipfile, sys; print chr(10).join(zipfile.ZipFile(sys.argv[1]).namelist())').' '
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user