2
0
mirror of https://github.com/junegunn/fzf synced 2024-11-14 18:12:53 +00:00

[vim] Don't pipe FZF_DEFAULT_COMMAND in Windows (#969)

Related #960, #552
This commit is contained in:
Jan Edmund Lazo 2017-07-09 00:08:16 -04:00 committed by Junegunn Choi
parent b13fcfd831
commit 68bd410159

View File

@ -365,10 +365,10 @@ try
let dict.dir = fnamemodify(dict.dir, ':p') let dict.dir = fnamemodify(dict.dir, ':p')
endif endif
if !has_key(dict, 'source') && !empty($FZF_DEFAULT_COMMAND) if !has_key(dict, 'source') && !empty($FZF_DEFAULT_COMMAND) && !s:is_win
let temps.source = s:fzf_tempname().(s:is_win ? '.bat' : '') let temps.source = s:fzf_tempname()
call writefile(s:wrap_cmds(split($FZF_DEFAULT_COMMAND, "\n")), temps.source) call writefile(s:wrap_cmds(split($FZF_DEFAULT_COMMAND, "\n")), temps.source)
let dict.source = (empty($SHELL) ? &shell : $SHELL) . (s:is_win ? ' /c ' : ' ') . fzf#shellescape(temps.source) let dict.source = (empty($SHELL) ? &shell : $SHELL).' '.fzf#shellescape(temps.source)
endif endif
if has_key(dict, 'source') if has_key(dict, 'source')