coc-lists icon indicating copy to clipboard operation
coc-lists copied to clipboard

arguments to rg (`rg-l`)

Open agtonybarletta opened this issue 4 years ago • 5 comments

Is there a way to pass arguments to rg?

Since the grep command uses rg, can we pass argument to rg within the extension? I would like to simulate the behaviour of rg -l using CocList

:CocList grep -l

agtonybarletta avatar May 08 '20 16:05 agtonybarletta

It should work by use fullname of option

chemzqm avatar May 08 '20 16:05 chemzqm

Configuration:

  • Windows 10
  • rg: Ripgrep-All 0.9.3 (chocolatey)
  • vim version: NVIM v0.5.0-435-ge11e93d13
  • node version: v12.16.1
  • coc.nvim version: 0.0.77-817efd5108
  • term: vtpcon
  • platform: win32

If I run :CocList grep --files-with-matches it doesn't show anything. The command >rg -files-with-matches <string> run with cmd.exe works as expected.

agtonybarletta avatar May 08 '20 16:05 agtonybarletta

You should use files source for grep files

chemzqm avatar May 08 '20 16:05 chemzqm

What do you mean with "files source"? My intention is to search for a word within the content of the files and then list the file names only (not the content that matches the word). In this way I will have one line for each file matched ( one line for each file that contains the searched word) and not one line for each match in the file.

agtonybarletta avatar May 08 '20 17:05 agtonybarletta

it won't work since grep list can't parse the result,should be possilbe with files source

chemzqm avatar May 08 '20 17:05 chemzqm