mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 12:03:48 -05:00
Support both spaces and quotes in &shell
Pass the git command to `jobstart()` as a string, not a list. `jobstart()` does some kind of internal black magic to parse strings like `'"/usr/bin/env bash" -l'`, whereas it would be impossible to pass in an equivalent argument using a list.
This commit is contained in:
committed by
Andy Stewart
parent
16e69e6571
commit
103acc7a23
@@ -132,7 +132,9 @@ function! gitgutter#diff#run_diff(realtime, preserve_full_diff)
|
||||
" Note that when `cmd` doesn't produce any output, i.e. the diff is empty,
|
||||
" the `stdout` event is not fired on the job handler. Therefore we keep
|
||||
" track of the jobs ourselves so we can spot empty diffs.
|
||||
let job_id = jobstart(split(&shell) + ['-c', cmd], {
|
||||
|
||||
let job_cmd = &shell . ' -c ' . cmd
|
||||
let job_id = jobstart(job_cmd, {
|
||||
\ 'on_stdout': function('gitgutter#handle_diff_job'),
|
||||
\ 'on_stderr': function('gitgutter#handle_diff_job'),
|
||||
\ 'on_exit': function('gitgutter#handle_diff_job')
|
||||
|
||||
Reference in New Issue
Block a user