aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-05-20 00:46:53 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-05-20 00:46:53 -0700
commit27f6c391c8da6efe49b11f73f5258d5cb124590b (patch)
tree6ba0cd2231a00853223da034c95f5a350d61fa5a
parentd9f0a92839000018eaaf7ebb34ed0260792fd116 (diff)
Added errors doc
-rw-r--r--bp.110
-rw-r--r--bp.1.md7
2 files changed, 17 insertions, 0 deletions
diff --git a/bp.1 b/bp.1
index 4921be7..5bdca11 100644
--- a/bp.1
+++ b/bp.1
@@ -271,6 +271,16 @@ not contain the word \f[B]\[lq]IGNORE\[rq]\f[R])
\f[I]name\f[R]\f[B]:\f[R] \f[I]pat\f[R]
Define \f[I]name\f[R] to mean \f[I]pat\f[R] (pattern definition)
.TP
+\f[B](!)\f[R] \f[I]error-pat\f[R]
+If \f[I]error-pat\f[R] matches, \f[B]bp\f[R] will not print any results
+in this file and instead print an error message highlighting the
+matching position of \f[I]error-pat\f[R] in the file and printing the
+text of \f[I]error-pat\f[R] as an error message.
+Then, \f[B]bp\f[R] will exit with a failure status and not process any
+further files.
+(e.g.\ \f[B]bp -G -p `(!){NOCOMMIT}=>\[dq]Cannot commit because of
+this\[dq]' && git commit -a\f[R])
+.TP
\f[B]#\f[R] \f[I]comment\f[R]
A line comment
.SH GRAMMAR FILES
diff --git a/bp.1.md b/bp.1.md
index 94b1af0..74fa454 100644
--- a/bp.1.md
+++ b/bp.1.md
@@ -241,6 +241,13 @@ contain the word **"IGNORE"**)
*name***:** *pat*
: Define *name* to mean *pat* (pattern definition)
+**(!)** *error-pat*
+: If *error-pat* matches, **bp** will not print any results in this file and
+instead print an error message highlighting the matching position of
+*error-pat* in the file and printing the text of *error-pat* as an error
+message. Then, **bp** will exit with a failure status and not process any
+further files.
+
**\#** *comment*
: A line comment