All apps/CGrep

CGrep

cgrep

Context-aware grep for source codes.

Runs as cgrep|macOS, Linux, Windows|github.com

Command form

ai-draft · 2 tasks · 14 fields

Context-aware grep that can limit matches to code, comments or string literals. Semantic -S patterns, file-type filters and editor launching are mostly left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui cgrep
Search source codeExample values, fixed in this page — nothing here reaches a terminal
Basic
Pattern*
string
Files or directories
any
Recursive
--recursive
Ignore case
--ignore-case
TasksEach one presets the form for one job
Search a tree
patternfilesrecursiveignore_case
Search comments only
patternfilescommentrecursive
ParametersOnly these flags are editable in the form
Pattern
string · positional 0
Files or directories
path · positional 1 · repeatable
Recursive
boolean
--recursive-r
Ignore case
boolean
--ignore-case-i
Whole word
boolean
--word-w
POSIX regex
boolean
--regex-G
Search code
boolean
--code-c
Search comments
boolean
--comment-m
Search string literals
boolean
--literal-l
Exclude test files
boolean
--no-tests
Invert match
boolean
--invert-match-v
Max matches per file
integer
--max-count
Count only
boolean
--count
File names only
boolean
--filename-only
SourcesEvery flag above is checked against these
readme
Usage: cgrep [OPTION] [PATTERN] files... -w,--word Force word matching -e,--edit Use edit distance -G,--regex Use regex matching (posix) -i,--ignore-case Ignore case distinctions -c,--code Enable search in source code -m,--comment Enable search in comments -l,--liter…
help9.3.1

github.com

Before it fills your prompt, Otty checks the installed cgrep against its version. A form that does not match your version is not offered.