From 9526594905916310299bd50f6d910eecf85cede5 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 18 Feb 2017 18:16:34 +0900 Subject: [PATCH] [vim] Fix FZF_DEFAULT_COMMAND on Windows Close #847. Patch submitted by @wontoncc. --- plugin/fzf.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 9c14f7ff..81c54bc9 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -291,9 +291,9 @@ try endtry if !has_key(dict, 'source') && !empty($FZF_DEFAULT_COMMAND) - let temps.source = tempname() + let temps.source = tempname().(s:is_win ? '.bat' : '') call writefile(split($FZF_DEFAULT_COMMAND, "\n"), temps.source) - let dict.source = (empty($SHELL) ? &shell : $SHELL) . ' ' . s:shellesc(temps.source) + let dict.source = (empty($SHELL) ? &shell : $SHELL) . (s:is_win ? ' /c ' : ' ') . s:shellesc(temps.source) endif if has_key(dict, 'source')