From 76bce26ab8744f8e13942eddcbe72c90dd7f0411 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 15 May 2015 22:18:07 +0900 Subject: [PATCH] Temporarily change shellredir (#159) --- plug.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plug.vim b/plug.vim index fcc9108..30ab8ff 100644 --- a/plug.vim +++ b/plug.vim @@ -1665,14 +1665,14 @@ endfunction function! s:system(cmd, ...) try - let sh = &shell + let [sh, shrd] = [&shell, &shellredir] if !s:is_win - set shell=sh + set shell=sh shellredir=>%s\ 2>&1 endif let cmd = a:0 > 0 ? s:with_cd(a:cmd, a:1) : a:cmd return system(s:is_win ? '('.cmd.')' : cmd) finally - let &shell = sh + let [&shell, &shellredir] = [sh, shrd] endtry endfunction