You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The feature I'm describing was best described here and the solution that I believe makes the most sense is here in the same thread.
Simply adding --files to a pattern does not give the required behavior.
Per rg -h
--files Print each file that would be searched.
The desired behavior is to Print each file where that file name matches the pattern given.
Describe the solution you'd like
Allow for prefixing a search with rg --files | rg so that the search returns filenames that match the pattern given, not filenames that contain matches for the pattern.
This could be in the form of a helper function similar to quote_prompt in telescope-live-grep-args.actions
Which would allow users to configure something like this
Ideally, this would work just like telescope.extensions.live_grep_args.live_grep_args but with the above mentioned functionality of only applying the pattern search on file names and only returning file names.
Describe alternatives you've considered
I tried essentially recreating this plugin but for files using Telescope functions.
This was kind of a hassle but I was able to get it somewhat working.
Is your feature request related to a problem? Please describe.
I love using this plugin like so:
This is great for searching for text inside files.
I would like something like this but for searching for files.
Currently I use this from telescope
Which does not support ripgrep.
The feature I'm describing was best described here and the solution that I believe makes the most sense is here in the same thread.
Simply adding
--files
to a pattern does not give the required behavior.Per
rg -h
--files Print each file that would be searched.
The desired behavior is to
Print each file where that file name matches the pattern given.
Describe the solution you'd like
Allow for prefixing a search with
rg --files | rg
so that the search returns filenames that match the pattern given, not filenames that contain matches for the pattern.This could be in the form of a helper function similar to
quote_prompt
intelescope-live-grep-args.actions
Which would allow users to configure something like this
Ideally, this would work just like
telescope.extensions.live_grep_args.live_grep_args
but with the above mentioned functionality of only applying the pattern search on file names and only returning file names.Describe alternatives you've considered
I tried essentially recreating this plugin but for files using Telescope functions.
This was kind of a hassle but I was able to get it somewhat working.
Additional context
Thread referenced earlier: BurntSushi/ripgrep#193
Thanks!
The text was updated successfully, but these errors were encountered: