1
1
mirror of https://github.com/wader/fq.git synced 2024-11-30 18:08:16 +03:00
fq/pkg/interp/match.jq
2021-11-30 21:10:26 +01:00

6 lines
325 B
Plaintext

# overload match to support buffer
def _orig_match($val): match($val);
def _orig_match($regex; $flags): match($regex; $flags);
def match($val): if _is_buffer then _match_buffer($val) else _orig_match($val) end;
def match($regex; $flags): if _is_buffer then _match_buffer($regex; $flags) else _orig_match($regex; $flags) end;