mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-08 21:44:48 +08:00
[GF?] Use bash instead of sh
[[ may not be available on sh
This commit is contained in:
@@ -624,7 +624,7 @@ function! fzf#vim#gitfiles(args, ...)
|
|||||||
" We're trying to access the common sink function that fzf#wrap injects to
|
" We're trying to access the common sink function that fzf#wrap injects to
|
||||||
" the options dictionary.
|
" the options dictionary.
|
||||||
let preview = printf(
|
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')
|
\ executable('delta')
|
||||||
\ ? 'git diff -- {-1} | delta --file-style=omit | sed 1d'
|
\ ? 'git diff -- {-1} | delta --file-style=omit | sed 1d'
|
||||||
\ : 'git diff --color=always -- {-1} | sed 1,4d',
|
\ : 'git diff --color=always -- {-1} | sed 1,4d',
|
||||||
|
|||||||
Reference in New Issue
Block a user