s:BuildShell: fix E706

This happens with old Vim versions (before 7.4.1546):

> Vim(let):E706: Variable type mismatch for: cmd

Ref: https://github.com/vim/vim/commit/f6f32c38b
This commit is contained in:
Daniel Hahler 2019-07-06 10:07:52 +02:00 committed by Tim Pope
parent fdb57922a4
commit 48e612601b

View File

@ -342,8 +342,7 @@ function! s:BuildShell(dir, env, args) abort
else
let pre = 'cd ' . s:shellesc(tree) . (s:winshell() ? '& ' : '; ') . pre
endif
let cmd = join(map(cmd, 's:shellesc(v:val)'))
return pre . g:fugitive_git_executable . ' ' . cmd
return pre . g:fugitive_git_executable . ' ' . join(map(cmd, 's:shellesc(v:val)'))
endfunction
function! fugitive#Prepare(...) abort