ensure that under MS Windows standard cmd shell executes bang commands

all of the latexmk and util library assumes that
under MS Windows the cmd shell is used.

The commit does this assumption justice.
This commit is contained in:
Enno Nagel 2014-12-14 16:48:58 +01:00
parent 725aae51eb
commit f71ecc279d

View File

@ -143,12 +143,21 @@ function! latex#util#execute(exe) " {{{1
endif endif
endif endif
if has('win32') && &shell !~? 'cmd'
let savedShell=[&shell, &shellcmdflag, &shellxquote, &shellxescape, &shellquote, &shellpipe, &shellredir, &shellslash]
set shell& shellcmdflag& shellxquote& shellxescape& shellquote& shellpipe& shellredir& shellslash&
endif
if silent if silent
silent execute cmd silent execute cmd
else else
execute cmd execute cmd
endif endif
if has('win32') && &shell !~? 'cmd'
let [&shell, &shellcmdflag, &shellxquote, &shellxescape, &shellquote, &shellpipe, &shellredir, &shellslash]=savedShell
endif
" Return to previous working directory " Return to previous working directory
if has_key(a:exe, 'wd') if has_key(a:exe, 'wd')
execute 'lcd ' . fnameescape(pwd) execute 'lcd ' . fnameescape(pwd)