Skip to content

Commit

Permalink
[vim] Don't pipe FZF_DEFAULT_COMMAND in Windows (#969)
Browse files Browse the repository at this point in the history
Related #960, #552
  • Loading branch information
janlazo authored and junegunn committed Jul 9, 2017
1 parent b13fcfd commit 68bd410
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/fzf.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 68bd410

Please sign in to comment.