Use 'sh' as shell instead of configurable '/bin/sh'.

sh isn't always at /bin/sh, e.g. on Android or Termux, but it is always
on the path.

See #360.
This commit is contained in:
Andy Stewart
2016-09-30 10:28:29 +01:00
parent 402257f920
commit 4f9c5b0f3e
3 changed files with 3 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ function! gitgutter#async#execute(cmd) abort
if has('nvim')
if has('unix')
let command = [g:gitgutter_sh, "-c", a:cmd]
let command = ["sh", "-c", a:cmd]
elseif has('win32')
let command = ["cmd.exe", "/c", a:cmd]
else
@@ -55,7 +55,7 @@ function! gitgutter#async#execute(cmd) abort
" only occurs when a file is not tracked by git).
if has('unix')
let command = [g:gitgutter_sh, "-c", a:cmd]
let command = ["sh", "-c", a:cmd]
elseif has('win32')
" Help docs recommend {command} be a string on Windows. But I think
" they also say that will run the command directly, which I believe would