From 68bd410159500f67e069a5d909f2d3062115cffc Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 9 Jul 2017 00:08:16 -0400 Subject: [PATCH] [vim] Don't pipe FZF_DEFAULT_COMMAND in Windows (#969) Related #960, #552 --- plugin/fzf.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index bad7449..c067512 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -365,10 +365,10 @@ try let dict.dir = fnamemodify(dict.dir, ':p') endif - if !has_key(dict, 'source') && !empty($FZF_DEFAULT_COMMAND) - let temps.source = s:fzf_tempname().(s:is_win ? '.bat' : '') + if !has_key(dict, 'source') && !empty($FZF_DEFAULT_COMMAND) && !s:is_win + let temps.source = s:fzf_tempname() 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 if has_key(dict, 'source')