summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-02-18 18:16:34 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-02-18 18:17:37 +0900
commit9526594905916310299bd50f6d910eecf85cede5 (patch)
tree3a195a2d49e8bcd8054bf225e186e68a46fcd451
parent3d74d277aa0446264240308e52df6f223cc2a8ed (diff)
downloadfzf-9526594905916310299bd50f6d910eecf85cede5.tar.gz
[vim] Fix FZF_DEFAULT_COMMAND on Windows
Close #847. Patch submitted by @wontoncc.
-rw-r--r--plugin/fzf.vim4
1 files 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')