mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-02-14 22:21:54 +08:00
[GFiles?] Wrap preview command in sh -c
To avoid errors when $SHELL is not posix-compliant. Close #224.
This commit is contained in:
@@ -422,7 +422,7 @@ function! fzf#vim#gitfiles(args, ...)
|
|||||||
let wrapped = fzf#wrap({
|
let wrapped = fzf#wrap({
|
||||||
\ 'source': 'git -c color.status=always status --short --untracked-files=all',
|
\ 'source': 'git -c color.status=always status --short --untracked-files=all',
|
||||||
\ 'dir': root,
|
\ 'dir': root,
|
||||||
\ 'options': '--ansi --multi --nth 2..,.. --prompt "GitFiles?> " --preview ''(git diff --color=always -- {-1} | sed 1,4d; cat {-1}) | head -500'''
|
\ 'options': '--ansi --multi --nth 2..,.. --prompt "GitFiles?> " --preview ''sh -c "(git diff --color=always -- {-1} | sed 1,4d; cat {-1}) | head -500"'''
|
||||||
\})
|
\})
|
||||||
call s:remove_layout(wrapped)
|
call s:remove_layout(wrapped)
|
||||||
let wrapped.common_sink = remove(wrapped, 'sink*')
|
let wrapped.common_sink = remove(wrapped, 'sink*')
|
||||||
|
|||||||
Reference in New Issue
Block a user