[GF?] Use bash instead of sh

[[ may not be available on sh
This commit is contained in:
Junegunn Choi
2020-12-12 10:28:26 +09:00
parent 97ec188e07
commit 65b6cdb0f2

View File

@@ -624,7 +624,7 @@ function! fzf#vim#gitfiles(args, ...)
" We're trying to access the common sink function that fzf#wrap injects to
" the options dictionary.
let preview = printf(
\ 'sh -c "if [[ {1} =~ M ]]; then %s; else %s {-1}; fi"',
\ 'bash -c "if [[ {1} =~ M ]]; then %s; else %s {-1}; fi"',
\ executable('delta')
\ ? 'git diff -- {-1} | delta --file-style=omit | sed 1d'
\ : 'git diff --color=always -- {-1} | sed 1,4d',