Make syntastic#util#parseShebang() aware of /usr/bin/env.
This commit is contained in:
parent
dd57547da0
commit
c325f6c815
@ -35,12 +35,12 @@ endfunction " }}}2
|
||||
"
|
||||
"{'exe': '/usr/bin/perl', 'args': ['-f', '-bar']}
|
||||
function! syntastic#util#parseShebang() " {{{2
|
||||
for lnum in range(1,5)
|
||||
for lnum in range(1, 5)
|
||||
let line = getline(lnum)
|
||||
|
||||
if line =~ '^#!'
|
||||
let exe = matchstr(line, '\m^#!\s*\zs[^ \t]*')
|
||||
let args = split(matchstr(line, '\m^#!\s*[^ \t]*\zs.*'))
|
||||
let line = substitute(line, '\v^#!\s*(\S+/env(\s+-\S+)*\s+)?', '', '')
|
||||
let exe = matchstr(line, '\m^\S*\ze')
|
||||
let args = split(matchstr(line, '\m^\S*\zs.*'))
|
||||
return { 'exe': exe, 'args': args }
|
||||
endif
|
||||
endfor
|
||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:syntastic_start
|
||||
endif
|
||||
|
||||
let g:syntastic_version = '3.4.0-91'
|
||||
let g:syntastic_version = '3.4.0-92'
|
||||
lockvar g:syntastic_version
|
||||
|
||||
" Sanity checks {{{1
|
||||
|
Loading…
x
Reference in New Issue
Block a user