mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 20:13:46 -05:00
@@ -24,7 +24,7 @@ function! gitgutter#async#execute(cmd) abort
|
|||||||
|
|
||||||
if has('nvim')
|
if has('nvim')
|
||||||
if has('unix')
|
if has('unix')
|
||||||
let command = ["/bin/sh", "-c", a:cmd]
|
let command = [g:gitgutter_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
|
||||||
@@ -55,7 +55,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/sh", "-c", a:cmd]
|
let command = [g:gitgutter_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
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ function! gitgutter#utility#use_known_shell() abort
|
|||||||
let s:shell = &shell
|
let s:shell = &shell
|
||||||
let s:shellcmdflag = &shellcmdflag
|
let s:shellcmdflag = &shellcmdflag
|
||||||
let s:shellredir = &shellredir
|
let s:shellredir = &shellredir
|
||||||
set shell=/bin/sh
|
let &shell = g:gitgutter_sh
|
||||||
set shellcmdflag=-c
|
set shellcmdflag=-c
|
||||||
set shellredir=>%s\ 2>&1
|
set shellredir=>%s\ 2>&1
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ call s:set('g:gitgutter_avoid_cmd_prompt_on_windows', 1)
|
|||||||
call s:set('g:gitgutter_async', 1)
|
call s:set('g:gitgutter_async', 1)
|
||||||
call s:set('g:gitgutter_log', 0)
|
call s:set('g:gitgutter_log', 0)
|
||||||
call s:set('g:gitgutter_git_executable', 'git')
|
call s:set('g:gitgutter_git_executable', 'git')
|
||||||
|
call s:set('g:gitgutter_sh', '/bin/sh')
|
||||||
|
|
||||||
if !executable(g:gitgutter_git_executable)
|
if !executable(g:gitgutter_git_executable)
|
||||||
call gitgutter#utility#warn('cannot find git. Please set g:gitgutter_git_executable.')
|
call gitgutter#utility#warn('cannot find git. Please set g:gitgutter_git_executable.')
|
||||||
|
|||||||
Reference in New Issue
Block a user