From e6e482054de77f3fe5d65344da86065373cf5f23 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 25 Nov 2023 14:57:19 -0500 Subject: Deprecate '-p' flag and replace backslash interpolation with curly brace interpolation --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'README.md') 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] [...]` +``` +bp [flags] [...] +``` +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 ` provide a pattern (equivalent to `bp '\()'`) * `-r` `--replace ` replace the input pattern with the given replacement * `-s` `--skip ` skip over the given pattern when looking for matches * `-B` `--context-before ` change how many lines of context are printed before each match -- cgit v1.2.3