Expand description
rgx filter subcommand — live/non-interactive regex filter over stdin or a file.
Re-exports§
Modules§
- app
- TUI-mode state for
rgx filter. - run
- TUI event loop for
rgx filter. - ui
- Rendering for
rgx filterTUI mode.
Structs§
Constants§
- EXIT_
ERROR - EXIT_
MATCH - Exit codes, matching grep conventions.
- EXIT_
NO_ MATCH
Functions§
- emit_
count - Emit only the count of matched lines.
- emit_
matches - Emit matching lines to
writer. Ifline_numberis true, each line is prefixed with its 1-indexed line number and a colon. - entry
- CLI entry point for
rgx filter. Reads input, decides between non-interactive and TUI modes, and returns an exit code. - filter_
lines - Apply the pattern to each line. Returns the 0-indexed line numbers of every
line whose match status (matches vs. invert) satisfies
options.invert. - read_
input - Read all lines from either a file path or the provided reader (typically stdin).
Trailing
\n/\r\nis stripped per line. A trailing empty line (from a terminating newline) is dropped.