parent
51001b66de
commit
1ff67622c5
@ -16,7 +16,7 @@ endif
|
||||
let g:loaded_syntastic_sh_sh_checker=1
|
||||
|
||||
function! s:GetShell()
|
||||
if !exists('b:shell') || b:shell == ""
|
||||
if !exists('b:shell') || b:shell == ''
|
||||
let b:shell = ''
|
||||
let shebang = getbufline(bufnr('%'), 1)[0]
|
||||
if len(shebang) > 0
|
||||
@ -28,6 +28,10 @@ function! s:GetShell()
|
||||
let b:shell = 'sh'
|
||||
endif
|
||||
endif
|
||||
" try to use env variable in case no shebang could be found
|
||||
if b:shell == ''
|
||||
let b:shell = fnamemodify(expand('$SHELL'), ':t')
|
||||
endif
|
||||
endif
|
||||
return b:shell
|
||||
endfunction
|
||||
|
Loading…
x
Reference in New Issue
Block a user