From f71ecc279de5a23b940939787ed574431f9daf89 Mon Sep 17 00:00:00 2001 From: Enno Nagel Date: Sun, 14 Dec 2014 16:48:58 +0100 Subject: [PATCH] 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. --- autoload/latex/util.vim | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/autoload/latex/util.vim b/autoload/latex/util.vim index 11f86ea..ef99e95 100644 --- a/autoload/latex/util.vim +++ b/autoload/latex/util.vim @@ -143,12 +143,21 @@ function! latex#util#execute(exe) " {{{1 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 silent execute cmd else execute cmd endif + if has('win32') && &shell !~? 'cmd' + let [&shell, &shellcmdflag, &shellxquote, &shellxescape, &shellquote, &shellpipe, &shellredir, &shellslash]=savedShell + endif + " Return to previous working directory if has_key(a:exe, 'wd') execute 'lcd ' . fnameescape(pwd)