From b27dc3eb1745ed29146feca94652bba0f0dd21c2 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Mon, 28 Aug 2017 09:32:13 -0400 Subject: [PATCH] [vim] Add parens around piped source commands (#1029) Previously a command like `echo a && echo b` would get transformed into `echo a && echo b | fzf`, which only pipes the output of the second command. Adding parentheses around the source command avoids this issue, and works on both Unix and Windows. --- plugin/fzf.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index f0cbe798..0f4fc772 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -366,7 +366,7 @@ try let source = dict.source let type = type(source) if type == 1 - let prefix = source.'|' + let prefix = '( '.source.' )|' elseif type == 3 let temps.input = s:fzf_tempname() call writefile(source, temps.input)