diff options
author | Rory Bradford <roryrjb@gmail.com> | 2021-07-17 08:10:20 +0100 |
---|---|---|
committer | Rory Bradford <roryrjb@gmail.com> | 2021-07-17 08:10:20 +0100 |
commit | 85d1e100ffad438d5ef27c080c4d74b0b282fb43 (patch) | |
tree | 1f6c1d46769f6fdbbf03c718f099bcadac550e6f /contrib/vim/plugin/rf.vim | |
parent | 89038a516bb0caa87c4936147a54c4e7303d5198 (diff) | |
download | rf-85d1e100ffad438d5ef27c080c4d74b0b282fb43.tar.gz |
Use xargs in Vim RF grep function
Signed-off-by: Rory Bradford <roryrjb@gmail.com>
Diffstat (limited to 'contrib/vim/plugin/rf.vim')
-rw-r--r-- | contrib/vim/plugin/rf.vim | 5 |
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 |