Last active
September 1, 2023 00:55
-
-
Save chadbaldwin/537a26a59fab2c0630e7ee2f09ae76f3 to your computer and use it in GitHub Desktop.
Testing globs in ripgrep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$string = 'Tables' | |
$result = '','/','*/','**/' | ? {$true} -PV left | | |
% { '','/','/*','/**' } -PV right | | |
% { | |
$glob = "${left}${string}${right}" | |
$stat = Measure-Command { $list = rg --files -g $glob } | |
[pscustomobject]@{ | |
Glob = $glob | |
Count = $list.Count | |
Stat = $stat.Milliseconds | |
} | |
} | |
$result | ft -AutoSize |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[reserving first comment]