CGREP(1)
π CGREP(1) β the girlies' guide to grepping your whole index π
okay bestie, sit down, hydrate, and let me tell you about cgrep β it's literally grep(1) but over all your indexed files. no cap.
β¨ NAME β¨
cgrep β it's like grep(1), but it runs over all indexed files. yes, all of them. slay. π
π SYNOPSIS π
cgrep [-c] [-h] [-i] [-l] [-n] regexp [ file... ]
π¦ DESCRIPTION π¦
so cgrep behaves exactly like grep, okay? it searches for regexp, which is an RE2 regular expression β that's "nearly PCRE," iykyk. π§
and the -c, -h, -i, -l, and -n flags? they work just like they do in grep. iconic behavior, no notes. BUT β and this is the part where you gotta pay attention, bestie β because of Go's flag parsing convention, you cannot combine them. the option pair -i -n can NOT be abbreviated to -in. it's giving "they have to be separate," fr fr. π
β οΈ don't try to be cute and smash them together. Go said no. π«
π OPTIONS π
-cβ suppresses the normal output, and instead prints a count of matching lines for each input file. numbers only, main character energy. π’-hβ suppresses the prefixing of file names</> on output. sometimes you just don't need the receipts. π-iβ ignores case distinctions in both theregexpand the input files. equal opportunity matching. β¨-lβ suppresses the normal output, and instead prints the name of each input file from which output would normally have been printed. just the names, bestie. π-nβ prefixes each line of output with the 1-based line number within its input file. so you always know exactly where it's at. π
πΈ ENVIRONMENT πΈ
cgrep uses the index stored in $CSEARCHINDEX β or, if that variable is unset or empty, it falls back to $HOME/.csearchindex. the way that it just knows where to lookβ¦ obsessed. π«Ά
π SEE ALSO π
π AUTHOR π
this manual page was written by Michael Stapelberg <stapelberg@debian.org>, for the Debian project (and it may be used by others). periodt. π
okay that's the whole thing, you're so ready. go forth and grep responsibly, queen. π
2013-06-23 β CGREP(1), General Commands Manual. bye bestie!! πβ¨
π¦ where this page comes from
- debian bookworm: codesearch 0.0~hg20120502-3+b19 Β· BSD-3-Clause
- debian trixie: codesearch 1.2.0-1+b8 Β· BSD-3-Clause
- ubuntu jammy: codesearch 0.0~hg20120502-3build2 Β· BSD-3-Clause
- ubuntu noble: codesearch 0.0~hg20120502-3build3 Β· BSD-3-Clause
- ubuntu noble: codesearch 0.0~hg20120502-3ubuntu0.24.04.3 Β· BSD-3-Clause
- ubuntu questing: codesearch 1.2.0-1
- ubuntu resolute: codesearch 1.2.0-1build1 Β· BSD-3-Clause
- ubuntu stonking: codesearch 1.2.0-1build1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms