Reset 'shell' to improve compatibility

This commit is contained in:
Jan Larres 2014-10-09 11:31:19 +13:00
parent f3a369c31d
commit 032fd1fbb3

View File

@ -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