recognize '#!/bin/sh' as well
This commit is contained in:
parent
6788c8513a
commit
7d6452a15f
@ -21,6 +21,8 @@ function! GetShell()
|
|||||||
return 'bash'
|
return 'bash'
|
||||||
elseif match(shebang, 'zsh') >= 0
|
elseif match(shebang, 'zsh') >= 0
|
||||||
return 'zsh'
|
return 'zsh'
|
||||||
|
elseif match(shebang, 'sh') >= 0
|
||||||
|
return 'sh'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
@ -30,7 +32,7 @@ function! SyntaxCheckers_sh_GetLocList()
|
|||||||
if !exists('b:shell')
|
if !exists('b:shell')
|
||||||
let b:shell = GetShell()
|
let b:shell = GetShell()
|
||||||
endif
|
endif
|
||||||
if len(b:shell) == 0
|
if len(b:shell) == 0 || !executable(b:shell)
|
||||||
return []
|
return []
|
||||||
endif
|
endif
|
||||||
let output = split(system(b:shell.' -n '.shellescape(expand('%'))), '\n')
|
let output = split(system(b:shell.' -n '.shellescape(expand('%'))), '\n')
|
||||||
|
Loading…
Reference in New Issue
Block a user