summaryrefslogtreecommitdiffstats
path: root/autoload/plug.vim
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2019-06-29 20:18:55 +0200
committerAhmed Abdelhalim <[email protected]>2019-06-29 20:18:55 +0200
commit5459f660edfa4cd4d3c913f09357d2348a1fc933 (patch)
tree22d7c38fc34cead95e65a4cef4828f59cc622dca /autoload/plug.vim
parentaa79aa6c5a21890c2082e8b80132486b2250bfbf (diff)
Update plug manager
Diffstat (limited to 'autoload/plug.vim')
-rw-r--r--autoload/plug.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/autoload/plug.vim b/autoload/plug.vim
index 2c26070..bfafbfb 100644
--- a/autoload/plug.vim
+++ b/autoload/plug.vim
@@ -811,7 +811,7 @@ function! s:bang(cmd, ...)
if s:is_win
let batchfile = tempname().'.bat'
call writefile(["@echo off\r", cmd . "\r"], batchfile)
- let cmd = batchfile
+ let cmd = s:shellesc(batchfile)
endif
let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%')
execute "normal! :execute g:_plug_bang\<cr>\<cr>"
@@ -1210,7 +1210,7 @@ function! s:spawn(name, cmd, opts)
let cmd = has_key(a:opts, 'dir') ? s:with_cd(a:cmd, a:opts.dir) : a:cmd
if !empty(job.batchfile)
call writefile(["@echo off\r", cmd . "\r"], job.batchfile)
- let cmd = job.batchfile
+ let cmd = s:shellesc(job.batchfile)
endif
let argv = add(s:is_win ? ['cmd', '/c'] : ['sh', '-c'], cmd)
@@ -2037,9 +2037,9 @@ function! s:system(cmd, ...)
if s:is_win
let batchfile = tempname().'.bat'
call writefile(["@echo off\r", cmd . "\r"], batchfile)
- let cmd = batchfile
+ let cmd = s:shellesc(batchfile)
endif
- return system(s:is_win ? '('.cmd.')' : cmd)
+ return system(cmd)
finally
let [&shell, &shellcmdflag, &shellredir] = [sh, shellcmdflag, shrd]
if s:is_win