From 4b53b995085b12dc903fec82104b7701fec891e1 Mon Sep 17 00:00:00 2001 From: Daniel Moch Date: Thu, 8 Dec 2016 18:58:43 -0500 Subject: [PATCH] Windows working now Docs for jab_start actually recommend passing the command as a string in Windows and a list in Unix. Go figure. --- plugin/makejob.vim | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/plugin/makejob.vim b/plugin/makejob.vim index 0a91467..0654c29 100644 --- a/plugin/makejob.vim +++ b/plugin/makejob.vim @@ -90,22 +90,6 @@ function! s:Expand(input) return join(l:expanded_input) endfunction -" Credit to Tim Pope for the magic here -function! s:Escape(str) - if has('win32') || has('win64') - if &shellxquote ==# '"' - return '"' . substitute(a:str, '"', '""', 'g') . '"' - else - let l:esc = exists('+shellxescape') ? &shellxescape : '"&|<>()@^' - return &shellxquote . - \ substitute(a:str, '['.l:esc.']', '^&', 'g') . - \ get({'(': ')', '"(': ')"'}, &shellxquote, &shellxquote) - endif - else - return a:str - endif -endfunction - function! s:MakeJob(grep, lmake, grepadd, bang, ...) let l:make = a:grep ? s:Expand(&grepprg) : s:Expand(&makeprg) let l:prog = split(l:make)[0] @@ -135,7 +119,9 @@ function! s:MakeJob(grep, lmake, grepadd, bang, ...) let l:make = l:make.' '.l:arg endif - let l:make = [&shell, &shellcmdflag, s:Escape(l:make)] + if !has('win32') && !has('win64') + let l:make = [&shell, &shellcmdflag, l:make] + endif endif let l:opts = { 'close_cb' : function('s:JobHandler'),