Commit Graph

613 Commits

Author SHA1 Message Date
20c11b29b3 Use strlcpy() instead of strcpy() 2025-03-03 16:22:38 -05:00
a92f70571f Update some annotations 2025-03-03 16:11:17 -05:00
fd751ecedf Bump open source version number 2025-03-03 16:03:51 -05:00
b2deef8db8 Bugfix 2025-03-03 15:51:50 -05:00
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
6f4261c80a Print quotes around string literal patterns when explaining matches 2024-09-08 14:20:24 -04:00
e60f1b17e0 Print which files and how many replacements for each file with a
replacement
2024-09-05 15:22:58 -04:00
c55fbce5b8 Set pattern source range correctly 2024-07-16 15:50:08 -04:00
27e61b3e18 Exclude '}' from pattern source range for string literals 2024-07-16 15:46:16 -04:00
d3286a9229 Fix for upto patterns without a target pattern, but which do have a skip
pattern, e.g. '#define {.. % (`\ nl)}'
2024-07-16 13:55:05 -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
22015bf6ac Rollback '..' optimization because it incorrectly skips ahead multiple
lines
2024-06-16 14:58:19 -04:00
46c2edd4d1 Change parsing so that ...foo parses as (.)(..foo) instead of
`(..(.))(foo)`
2024-06-07 14:58:50 -04:00
31e414af50 Fix issue with replacement text printing before its line number 2024-06-07 14:45:03 -04:00
0e9f324955 Add optimization for .."literal" 2024-06-07 14:22:42 -04:00
6d0e4fd1d2 Bugfix: upto patterns should not accept an empty string as a target,
which fixes an issue where `echo "hello@" | bp '{..}{"@"}'` would fail
to match properly.
2024-06-07 13:30:25 -04:00
a8ae09fb89 Remove unnecessary header files from install 2024-05-29 13:39:05 -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
1597b34a95 Move more non-public macros out of header 2024-05-28 02:06:38 -04:00
2ec9f76b72 Rename 'Match' macro to avoid confusion 2024-05-28 02:05:57 -04:00
acdb6ff91b Add shadow warning 2024-05-28 02:00:39 -04:00
952b55fbdb Fix variable shadowing 2024-05-28 02:00:14 -04:00
31649edc77 Add some fixes and compiler flags 2024-05-28 01:59:03 -04:00
59c5470ade Tweak default visibility settings 2024-05-28 01:56:13 -04:00
1dd05d2d18 Include fewer files in libbp 2024-05-28 01:48:58 -04:00
96d23f1bf3 Light cleanup of utils 2024-05-28 01:41:07 -04:00
4fbc4288fd Update test rule 2024-05-28 01:12:24 -04:00
5f49677d76 Bugfix for string literals and add support for printing patterns with
--verbose
2024-02-11 16:46:07 -05:00
8041d3047c Bugfix for slash-normalization in filenames 2024-02-04 21:04:43 -05:00
47a81dfb64 Use strcasestr() when ignoring case, which improves performance 2024-01-26 13:25:08 -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
e0a55ba617 Format specifiers for size_t should be %zu instead of %lu 2023-10-15 12:47:26 -04:00
6235f81a3f Slightly normalize file paths to strip // 2023-08-26 17:55:26 -04:00
6ce581173f Fix Lua module 2023-05-16 20:05:48 -04:00
05dcacd94a Respect $NO_COLOR 2023-05-16 20:03:11 -04:00
68f6218444 Fix domains to require a TLD (but allow non-tld domains like "localhost"
in URLS)
2023-05-06 13:56:48 -04:00
6f5bb02b92 Use tagged union style for extra safety and concision 2023-05-06 13:43:32 -04:00
0050a6fc06 Add number of characters printed to fprint_match() 2022-12-27 14:43:10 -05:00
3ed2c19594 Use #pragma once 2022-11-07 22:54:59 -05:00
372eb2647f Added a column getter 2022-11-03 12:55:01 -04:00
611cf8441a Fixing up more edge cases for retrieving captures 2022-10-30 17:01:17 -04:00
b306f72050 Another fix to numbered captures 2022-10-30 16:50:19 -04:00
3296ce42d9 Fix for numbered capture logic 2022-10-27 20:23:51 -04:00
69740ed659 Fix json output 2022-10-27 20:19:21 -04:00