about summary refs log tree commit diff stats
path: root/contrib
diff options
context:
space:
mode:
authorRory Bradford <roryrjb@gmail.com>2021-07-17 08:10:20 +0100
committerRory Bradford <roryrjb@gmail.com>2021-07-17 08:10:20 +0100
commit85d1e100ffad438d5ef27c080c4d74b0b282fb43 (patch)
tree1f6c1d46769f6fdbbf03c718f099bcadac550e6f /contrib
parent89038a516bb0caa87c4936147a54c4e7303d5198 (diff)
downloadrf-85d1e100ffad438d5ef27c080c4d74b0b282fb43.tar.gz
Use xargs in Vim RF grep function
Signed-off-by: Rory Bradford <roryrjb@gmail.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/vim/plugin/rf.vim5
1 files changed, 3 insertions, 2 deletions
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