diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2020-02-13 21:12:11 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2020-02-13 21:13:30 +0900 |
commit | 5e1db9fdd31257bc807348983dd3ae690056e5e0 (patch) | |
tree | c541a2b53921737ff11ea17b2348ba1e9938bb6b /plugin | |
parent | 9d7480ae3c109358ea0979626c6c9f68c79111c8 (diff) |
[vim] Do not pipe FZF_DEFAULT_COMMAND
Revert the change introduced in #552. It seems that the startup time
difference between bash and fish is not much of an issue now.
> time bash -c 'date'
Thu Feb 13 21:15:03 KST 2020
real 0m0.008s
user 0m0.003s
sys 0m0.003s
> time fish -c 'date'
Thu Feb 13 21:15:05 KST 2020
real 0m0.014s
user 0m0.007s
sys 0m0.006s
When we explicitly *pipe* $FZF_DEFAULT_COMMAND instead of making fzf
internally start the process ($FZF_DEFAULT_COMMAND | fzf), fzf may hang
if the input process doesn't quickly process SIGPIPE and abort.
Also, fzf#vim#grep temporarily swaps $FZF_DEFAULT_COMMAND instead of
setting 'sink' so fzf can kill the default command on 'reload'.
https://github.com/junegunn/fzf.vim/issues/927
However, because of the "pipe conversion", the trick wasn't working as
expected.
https://github.com/junegunn/fzf.vim/blob/467c3277884240f7b5430f8f4d600e3415c38f3b/autoload/fzf/vim.vim#L720-L726
We can go even further and always set $FZF_DEFAULT_COMMAND instead of
piping source command.
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/fzf.vim | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 62671b12..4f361b42 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -402,12 +402,6 @@ try let dict.dir = fnamemodify(dict.dir, ':p') endif - 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).' '.fzf#shellescape(temps.source) - endif - if has_key(dict, 'source') let source = dict.source let type = type(source) |