From 032fd1fbb3eb19d06abf144f34773de76785da29 Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Thu, 9 Oct 2014 11:31:19 +1300 Subject: [PATCH] Reset 'shell' to improve compatibility --- autoload/tagbar.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 9f75978..0d22ecc 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -3502,6 +3502,12 @@ endfunction function! s:ExecuteCtags(ctags_cmd) abort call s:debug('Executing ctags command: ' . a:ctags_cmd) + if has('unix') + " Reset shell in case it is set to something incompatible like fish + let shell_save = &shell + set shell=sh + endif + if exists('+shellslash') let shellslash_save = &shellslash set noshellslash @@ -3531,6 +3537,10 @@ function! s:ExecuteCtags(ctags_cmd) abort let &shellslash = shellslash_save endif + if has('unix') + let &shell = shell_save + endif + return ctags_output endfunction