Commit Graph

152 Commits

Author SHA1 Message Date
c234c92eeb Remove printf.h dependency 2025-03-03 15:50:59 -05:00
7fd49c0225 Fix piped in input 2024-09-18 15:31:01 -04:00
9d5b9577f7 Change default behavior in git repository to be searching through repo
files when no argument are specified. -G is now just for `git ls-files`
patterns
2024-09-08 14:32:42 -04:00
e60f1b17e0 Print which files and how many replacements for each file with a
replacement
2024-09-05 15:22:58 -04:00
5a6d4e4b8b Deprecate JSON output format 2024-06-23 19:23:02 -04:00
faba716e87 Add special case support for parsing bp "->foo" as a pattern instead
of an invalid flag
2024-06-23 13:09:39 -04:00
da067957c8 Rename match_t -> bp_match_t 2024-05-29 13:14:35 -04:00
f271863601 Rename 'pat_t' -> 'bp_pat_t' 2024-05-29 13:12:34 -04:00
5f49677d76 Bugfix for string literals and add support for printing patterns with
--verbose
2024-02-11 16:46:07 -05:00
18bb2575ca Smart case by default 2024-01-15 16:25:01 -05:00
3a728b28df Fix "-w" flag and fix optimization for skipping to match 2023-11-27 14:20:43 -05:00
e6e482054d Deprecate '-p' flag and replace backslash interpolation with curly brace
interpolation
2023-11-25 14:57:19 -05:00
05dcacd94a Respect $NO_COLOR 2023-05-16 20:03:11 -04:00
0050a6fc06 Add number of characters printed to fprint_match() 2022-12-27 14:43:10 -05:00
2bc0ca7390 Revert "Moving to each_match() API"
This reverts commit 9380a54d7c.
2022-10-27 12:49:31 -04:00
9380a54d7c Moving to each_match() API 2022-10-26 20:12:18 -04:00
24ed834317 Simplified things by passing a def argument to next_match instead of
chaining defs together. Also simplified `..` by just using a lookahead
instead of retconning it. Immutability invariants are now enforced
better.
2022-04-30 14:19:08 -04:00
326a0b960c Moving print logic out of match.c and renaming explain -> printmatch 2022-04-09 14:15:07 -04:00
c1c4f2109b Fixed typo 2022-02-28 18:45:34 -05:00
3aabbb6dc5 Fix to ensure proper line numbering 2021-11-07 12:27:42 -08:00
0ad64a1006 Bugfix for use-after-free, as well as an issue with the order
grammars were loaded
2021-10-01 19:29:31 -07:00
46fa856529 Better error messages (bugfix) 2021-09-27 21:54:41 -07:00
90bfefda16 Added comment 2021-09-27 21:42:22 -07:00
117ccaa1dc Cleanup for trailing line printing 2021-09-27 21:41:30 -07:00
c60c1db8a2 Bugfix for certain patterns (e.g. $$) that didn't trigger line number
printing
2021-09-27 21:34:08 -07:00
911827fac3 Removed definitions as a separate type and instead encode that value in
the patterns themselves. This simplifies memory management a lot and
speeds up performance.
2021-09-27 20:36:10 -07:00
77d9007a88 Refactor of pat_t memory management to use doubly linked lists, and
moving the recursive freeing code from Lua/lbp.c into pattern.c
2021-09-26 13:12:02 -07:00
270a0a47c4 Minor cleanup 2021-09-25 14:53:34 -07:00
1593b30393 Minor cleanup of context printing code 2021-09-25 01:34:19 -07:00
8ca1efeff9 Slightly ugly hack to fix but where line number got double printed 2021-09-25 00:31:09 -07:00
b00fc15125 Removed file_err() and file_printf() in favor of just inlining some of
the error assertion code. Also eliminated most of the spoof_file() calls
in favor of just using command line arguments directly.
2021-09-24 23:49:22 -07:00
1b777a569e Fixed double line numbering 2021-09-24 23:00:40 -07:00
6b98401771 Removed print files 2021-09-23 20:53:25 -07:00
3a2492d584 WIP: working line breaks, formatting, etc. All seems functional, but a
bit messy
2021-09-23 20:51:04 -07:00
04eb92153f WIP 2021-09-23 17:31:21 -07:00
ce915a5433 Patterns don't need to reference a separate start value anymore 2021-09-23 15:40:45 -07:00
fac3fd9772 Moving pattern lifetime tracking off of files and onto its own list of
allocated pats.
2021-09-23 15:24:08 -07:00
8e1e6572fe Moved type defs into their own files instead of types.h 2021-09-23 15:15:48 -07:00
89c5888dd6 Switched to using an optional type 2021-09-23 14:38:46 -07:00
e938ecbdcc Merge branch 'master' into setjmp 2021-09-23 13:42:46 -07:00
744a927562 Deprecated (!)-errors 2021-09-23 13:42:23 -07:00
cf99abb852 WIP implementation of setjmp/longjmp recovery 2021-09-23 13:38:20 -07:00
f2db62cb55 Moved trailing newline guarantee code into bp.c 2021-09-22 22:57:44 -07:00
90c3c13a02 Moving cache logic into match, cleaner next_match() API, and slightly
less tightly coupled UTF8 API
2021-09-21 18:45:43 -07:00
9401facbe7 Minor cleanup 2021-09-19 17:55:26 -07:00
42c75cfd73 Fix for single-arg when it's a directory 2021-09-19 17:08:51 -07:00
393778ffab Shortening \033[0m -> \033[m 2021-09-07 13:39:11 -07:00
f3eb2e99cd Fixes for inplace modifications 2021-09-07 13:38:57 -07:00
58fef531eb Changed non-tty output to BARE instead of PLAIN 2021-09-04 14:09:20 -07:00
615d94ba68 Improved formatting options 2021-09-02 18:07:18 -07:00