From 72a83456ad15d137bf25ab010995e8a5a44d055e Mon Sep 17 00:00:00 2001 From: mitermayer Date: Thu, 1 Feb 2018 13:08:43 -0800 Subject: updating command to respect shell and shellcmdflag --- autoload/prettier.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/prettier.vim b/autoload/prettier.vim index 7d400ad..bda5b66 100644 --- a/autoload/prettier.vim +++ b/autoload/prettier.vim @@ -82,7 +82,7 @@ function! s:Prettier_Exec_Async_Nvim(cmd, startSelection, endSelection) abort let l:out = [] let l:err = [] - let l:job = jobstart(l:async_cmd, { + let l:job = jobstart([&shell, &shellcmdflag, l:async_cmd], { \ 'on_stdout': {job_id, data, event -> extend(l:out, data)}, \ 'on_stderr': {job_id, data, event -> extend(l:err, data)}, \ 'on_exit': {job_id, status, event -> s:Prettier_Job_Nvim_Exit(status, l:dict, l:out, l:err)}, @@ -168,7 +168,7 @@ function! s:Prettier_Exec_Async(cmd, startSelection, endSelection) abort if s:prettier_job_running != 1 let s:prettier_job_running = 1 - call job_start(['sh', '-c', l:async_cmd], { + call job_start([&shell, &shellcmdflag, l:async_cmd], { \ 'in_io': 'buffer', \ 'in_top': a:startSelection, \ 'in_bot': a:endSelection, -- cgit v1.3