Version 0.3.0 behavior is documented here. Thesupport record separates local verification frompublished MoonX behavior; moonx examples use registry releases.
Search text using basic regular expressions by default, extended expressionswith -E, or fixed strings with -F; -G restores basic syntax. Options include-E, -F, -G, -o, -i, -v, -n, -b, -c, -l, -L, -q,-H, -h, -x, -w, -e, -f, and recursive -r. -A/-B/-C emitcontext with GNU-style selected/context separators, while -z switches inputand output records to NUL. Recursive reads accept repeated --include and--exclude basename patterns using portable * and ? wildcards. -R aliasesthe same traversal as -r; neither follows symbolic links during recursion.
Binary input defaults to GNU 3.12's grep: NAME: binary file matches stderrnotice;--binary-files=text (or -a) searches and emits raw records, and--binary-files=without-match skips binary inputs. -s suppresses file-readdiagnostics without hiding status 2. Matching, offsets, and record boundariesuse a byte-oriented C-locale profile without changing the process environment.Input and output use bounded blocks. Records within a block are views; retainedstorage grows with a cross-block record and requested context, rather than theentire input. -q and -l stop reading when their result is determined.Binary detection applies as chunks arrive, so text already emitted before alater NUL remains visible. Complete records and a partial final record survivea later input error; the error still produces status 2.-o emits nonempty, nonoverlapping matches using leftmost-longest selection;-b -o reports the offset of each match. No group separator is emitted withoutcontext options. BRE/ERE patterns are compiled once by the shared C-bytematcher, including pattern backreferences and directional/ordinary wordassertions. Each -e expression retains its own capture numbering. -i foldsC-byte literals, classes and backreferences while preserving assertion grammar.Repeated nullable captures follow the tested GNU candidate and capture-registerselection, including counted repeats and references. See theworkspace support record.Locale-sensitive collation andmultibyte case folding are not currently implemented. Exit statuses are 0 for a selectedline/file, 1 for no selection, and 2 for an error.
Standalone --version prints exactly grep 0.3.0 followed by onenewline. Standalone --help starts with Usage: grep, lists bothmetadata options, and ends with a newline. Both write to stdout, leave stdinunread, and exit with status 0. Exact-version publication and verificationremain recorded separately in the support record.