All apps/grep

grep

grep

grep prints lines that match a pattern in files or standard input.

Runs as grep|macOS, Linux, Windows

Command form

ai-draft · 2 tasks · 16 fields

Search for a pattern in files or directories. Context, match filtering and file selection options are included; binary-file and device handling are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui grep
Search filesExample values, fixed in this page — nothing here reaches a terminal
Basic
Pattern*
string
Files or directories*
any
Recursive
-r
Show line numbers
-n
TasksEach one presets the form for one job
Search a directory tree
patternpathsrecursiveline_number
List files containing a match
patternpathsrecursivefiles_with_matches
ParametersOnly these flags are editable in the form
Pattern
A basic regular expression unless a pattern-type option is set.
string · positional 0
Files or directories
Leave empty to read standard input. Directories need Recursive.
path · positional 1 · repeatable
Extended regex
boolean
-E
Fixed string (no regex)
boolean
-F
Ignore case
boolean
-i
Invert match
boolean
-v
Whole words only
boolean
-w
Recursive
boolean
-r
Show line numbers
boolean
-n
Count matching lines
boolean
-c
List matching files only
boolean
-l
Print only the matched part
boolean
-o
Context lines
integer
-C
Only files matching glob
string
--include
Skip files matching glob
string
--exclude
Color
enum
--colorautoalwaysnever
SourcesEvery flag above is checked against these
fig
completion

github.com

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