This commit is contained in:
WADA Takashi 2018-05-05 16:47:26 +00:00 committed by GitHub
commit 768c8a39f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1196,7 +1196,7 @@ function! s:spawn(name, cmd, opts)
let s:jobs[a:name] = job
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', cmd], job.batchfile)
call writefile(["@echo off\r", cmd], job.batchfile)
let cmd = job.batchfile
endif
let argv = add(s:is_win ? ['cmd', '/c'] : ['sh', '-c'], cmd)
@ -2023,7 +2023,7 @@ function! s:system(cmd, ...)
let cmd = a:0 > 0 ? s:with_cd(a:cmd, a:1) : a:cmd
if s:is_win
let batchfile = tempname().'.bat'
call writefile(['@echo off', cmd], batchfile)
call writefile(["@echo off\r", cmd], batchfile)
let cmd = batchfile
endif
return system(s:is_win ? '('.cmd.')' : cmd)
@ -2357,7 +2357,7 @@ function! s:preview_commit()
let cmd = 'cd '.s:shellesc(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha
if s:is_win
let batchfile = tempname().'.bat'
call writefile(['@echo off', cmd], batchfile)
call writefile(["@echo off\r", cmd], batchfile)
let cmd = batchfile
endif
execute 'silent %!' cmd