aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2023-11-25 14:57:19 -0500
committerBruce Hill <bruce@bruce-hill.com>2023-11-25 14:57:19 -0500
commite6e482054de77f3fe5d65344da86065373cf5f23 (patch)
treea6876c73bccf490512be5ff93fa808f3ce8d1c95 /README.md
parente0a55ba6176df325b65b1768bba929805444bf88 (diff)
Deprecate '-p' flag and replace backslash interpolation with curly brace
interpolation
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 7 insertions, 2 deletions
diff --git a/README.md b/README.md
index 7e7d714..e8747d5 100644
--- a/README.md
+++ b/README.md
@@ -13,8 +13,14 @@ Run `make tutorial` to run through the tutorial. It walks through some basic pat
## Usage
-`bp [flags] <pattern> [<input files>...]`
+```
+bp [flags] <pattern> [<input files>...]
+```
+BP is optimized for matching literal strings, so the main pattern argument is
+interpreted as a string literal. BP pattern syntax is inserted using curly
+brace interpolations like `bp 'foo{..}baz'` (match the string literal "foo" up
+to and including the next occurrence of "baz" on the same line).
### Flags
@@ -25,7 +31,6 @@ Run `make tutorial` to run through the tutorial. It walks through some basic pat
* `-e` `--explain` print an explanation of the matches
* `-j` `--json` print matches as JSON objects
* `-l` `--list-files` print only filenames containing matches
-* `-p` `--pattern <pat>` provide a pattern (equivalent to `bp '\(<pat>)'`)
* `-r` `--replace <replacement>` replace the input pattern with the given replacement
* `-s` `--skip <skip pattern>` skip over the given pattern when looking for matches
* `-B` `--context-before <N>` change how many lines of context are printed before each match