Use /bin/sh as default shell.

- /bin/bash is not part of OpenBSD.
- We need only a POSIX shell, not bash specifically.

Closes #340.
This commit is contained in:
Xavier Guérin
2016-05-20 11:13:45 +01:00
committed by Andy Stewart
parent 90c558b1dc
commit 377c71d982
2 changed files with 3 additions and 3 deletions

View File

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

View File

@@ -186,7 +186,7 @@ function! gitgutter#utility#use_known_shell() abort
if has('unix') if has('unix')
let s:shell = &shell let s:shell = &shell
let s:shellcmdflag = &shellcmdflag let s:shellcmdflag = &shellcmdflag
set shell=/bin/bash set shell=/bin/sh
set shellcmdflag=-c set shellcmdflag=-c
endif endif
endfunction endfunction