From 85d1e100ffad438d5ef27c080c4d74b0b282fb43 Mon Sep 17 00:00:00 2001 From: Rory Bradford Date: Sat, 17 Jul 2021 08:10:20 +0100 Subject: Use xargs in Vim RF grep function Signed-off-by: Rory Bradford --- contrib/vim/plugin/rf.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/vim/plugin/rf.vim b/contrib/vim/plugin/rf.vim index 4ea281c..859d81e 100644 --- a/contrib/vim/plugin/rf.vim +++ b/contrib/vim/plugin/rf.vim @@ -7,8 +7,9 @@ let g:rf_prefix = "" set errorformat+=%f -function! g:RFGrepR(args, ft) - let results = system('grep -nrI ' . shellescape(a:args) . " $(rf -- " . shellescape(a:ft) . ")") +function! g:RFGrepR(args) + " let results = system('grep -nrI ' . shellescape(a:args) . " $(rf -- " . shellescape(a:ft) . ")") + let results = system("rf -s'' | xargs grep -nrI '" . shellescape(a:args) . "'") cgete results | copen 9 endfunction -- cgit 1.4.1-2-gfad0