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
Using linux repo: there are almost 60k files there (find | wc -l reports 59 296).
ag -g '' reports 55 292 files and takes 0.8 second. This is the command that will be run by Unite plugin to collect the initial matches.
rg --files -g *''* reports 8 files (just the top-level files). So, let's try some other glob: rg --files -g **/*''* reports 965 (files inside top-level directories only). The only way to make rg return all files from the directory is to use shopt -s globstar, then rg --files -g *''* will return all files that should be returned, but it will take 3-4 seconds to run.
This wouldn't be that bad if Unite used this command on each pattern that is entered in its window (ag -g 'Makefile' and rg --files -g *'Makefile'* return (more or less) the same list of files). The problem is that it collects the initial list of files using this command, then just filters it for matches (so using rg only 8 files will be available to choose at the beginning and then, after typing Makefile as the pattern, one file: top-level Makefile).
So, is there a way to make rg recurse into directories (other than enabling globstar)?
P.S. Not a high-priority, I can always fallback to using find/ag in Unite. :) Thanks!
The text was updated successfully, but these errors were encountered:
As suggested in #284 I am opening a new issue.
Using
linux
repo: there are almost 60k files there (find | wc -l
reports 59 296).ag -g ''
reports 55 292 files and takes 0.8 second. This is the command that will be run by Unite plugin to collect the initial matches.rg --files -g *''*
reports 8 files (just the top-level files). So, let's try some other glob:rg --files -g **/*''*
reports 965 (files inside top-level directories only). The only way to makerg
return all files from the directory is to useshopt -s globstar
, thenrg --files -g *''*
will return all files that should be returned, but it will take 3-4 seconds to run.This wouldn't be that bad if Unite used this command on each pattern that is entered in its window (
ag -g 'Makefile'
andrg --files -g *'Makefile'*
return (more or less) the same list of files). The problem is that it collects the initial list of files using this command, then just filters it for matches (so usingrg
only 8 files will be available to choose at the beginning and then, after typingMakefile
as the pattern, one file: top-level Makefile).So, is there a way to make
rg
recurse into directories (other than enablingglobstar
)?P.S. Not a high-priority, I can always fallback to using
find
/ag
in Unite. :) Thanks!The text was updated successfully, but these errors were encountered: