From 43e7c1f542032ec5be1b6a0ff4440a5370e9bce3 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Tue, 6 Sep 2016 10:35:36 +0100 Subject: [PATCH] Set &shellredir when changing shell. See #365. --- autoload/gitgutter/utility.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/gitgutter/utility.vim b/autoload/gitgutter/utility.vim index 3135453..d358e4e 100644 --- a/autoload/gitgutter/utility.vim +++ b/autoload/gitgutter/utility.vim @@ -186,8 +186,10 @@ function! gitgutter#utility#use_known_shell() abort if has('unix') let s:shell = &shell let s:shellcmdflag = &shellcmdflag + let s:shellredir = &shellredir set shell=/bin/sh set shellcmdflag=-c + set shellredir=>%s\ 2>&1 endif endfunction @@ -195,5 +197,6 @@ function! gitgutter#utility#restore_shell() abort if has('unix') let &shell = s:shell let &shellcmdflag = s:shellcmdflag + let &shellredir = s:shellredir endif endfunction