temporarily overwrite shell to fix #55

This commit is contained in:
Alan Hamlett 2017-10-18 19:08:56 -07:00
parent 6816edd140
commit be69fd223d

View file

@ -314,6 +314,12 @@ let s:VERSION = '6.0.1'
let cmd = cmd + ['--extra-heartbeats']
endif
" overwrite shell
let [sh, shellcmdflag, shrd] = [&shell, &shellcmdflag, &shellredir]
if !s:IsWindows()
set shell=sh shellredir=>%s\ 2>&1
endif
if s:has_async
let job = job_start([&shell, &shellcmdflag, s:JoinArgs(cmd)], {
\ 'stoponexit': '',
@ -359,6 +365,9 @@ let s:VERSION = '6.0.1'
endif
endif
" restore shell
let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd]
let s:last_sent = localtime()
" need to repaint in case a key was pressed while sending