ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
grep_parse_result_t Struct Reference

Parsed pattern result from /pattern/flags syntax. More...

#include <include/ascii-chat/log/grep.h>

Data Fields

char pattern [4096]
 Parsed pattern string.
 
uint32_t pcre2_options
 PCRE2 compile options.
 
bool is_fixed_string
 True if fixed string (not regex)
 
bool case_insensitive
 Case-insensitive (i flag)
 
bool invert
 Invert match (I flag)
 
bool global_flag
 Highlight all matches (g flag)
 
int context_before
 Lines before match (B<n> flag)
 
int context_after
 Lines after match (A<n> flag)
 
bool valid
 True if parsing succeeded.
 

Detailed Description

Parsed pattern result from /pattern/flags syntax.

Shared between –grep CLI filtering and interactive grep.

Definition at line 18 of file grep.h.

Field Documentation

◆ case_insensitive

bool grep_parse_result_t::case_insensitive

Case-insensitive (i flag)

Definition at line 22 of file grep.h.

Referenced by grep_init(), grep_parse_pattern(), log_search_enter_mode(), log_search_exit_mode(), log_search_handle_key(), and log_search_init().

◆ context_after

int grep_parse_result_t::context_after

Lines after match (A<n> flag)

Definition at line 26 of file grep.h.

Referenced by grep_init(), grep_parse_pattern(), log_search_enter_mode(), log_search_exit_mode(), log_search_handle_key(), and log_search_init().

◆ context_before

int grep_parse_result_t::context_before

Lines before match (B<n> flag)

Definition at line 25 of file grep.h.

Referenced by grep_init(), grep_parse_pattern(), log_search_enter_mode(), log_search_exit_mode(), log_search_handle_key(), and log_search_init().

◆ global_flag

bool grep_parse_result_t::global_flag

Highlight all matches (g flag)

Definition at line 24 of file grep.h.

Referenced by grep_init(), grep_parse_pattern(), log_search_enter_mode(), log_search_exit_mode(), log_search_handle_key(), and log_search_init().

◆ invert

bool grep_parse_result_t::invert

Invert match (I flag)

Definition at line 23 of file grep.h.

Referenced by grep_init(), grep_parse_pattern(), log_search_enter_mode(), log_search_exit_mode(), log_search_handle_key(), and log_search_init().

◆ is_fixed_string

bool grep_parse_result_t::is_fixed_string

True if fixed string (not regex)

Definition at line 21 of file grep.h.

Referenced by grep_init(), grep_parse_pattern(), log_search_enter_mode(), log_search_exit_mode(), log_search_handle_key(), and log_search_init().

◆ pattern

char grep_parse_result_t::pattern[4096]

◆ pcre2_options

uint32_t grep_parse_result_t::pcre2_options

PCRE2 compile options.

Definition at line 20 of file grep.h.

Referenced by grep_init(), grep_parse_pattern(), log_search_enter_mode(), log_search_exit_mode(), log_search_handle_key(), and log_search_init().

◆ valid

bool grep_parse_result_t::valid

The documentation for this struct was generated from the following file: