aboutsummaryrefslogtreecommitdiffstats
path: root/pw.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-01 02:08:10 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-01 02:08:10 -0700
commit76eff899945b983a30611588ea8ff6fd2ad265ca (patch)
tree61d8c232acb6b9ee65d5191e25c541e77e0f87a8 /pw.1
parent20660b58f705b5fb21c79fdd4e200ae56c7698f0 (diff)
downloadpw-76eff899945b983a30611588ea8ff6fd2ad265ca.tar.gz
pw-76eff899945b983a30611588ea8ff6fd2ad265ca.tar.bz2
pw-76eff899945b983a30611588ea8ff6fd2ad265ca.zip
Allow leading ! to invert trigger patterns.
Diffstat (limited to 'pw.1')
-rw-r--r--pw.120
1 files changed, 19 insertions, 1 deletions
diff --git a/pw.1 b/pw.1
index f4f05fc..95be260 100644
--- a/pw.1
+++ b/pw.1
@@ -191,7 +191,7 @@ and
also terminate colon mode without executing a command. Colon commands
are documented in the COLON COMMANDS section below.
-.IP "[\fIpos\fP]\fB/\fP\fIpattern\fP, [\fIpos\fP]\fB?\fP\fIpattern\fP"
+.IP "[\fIpos\fP]\fB/[!]\fP\fIpattern\fP, [\fIpos\fP]\fB?[!]\fP\fIpattern\fP"
Set a trigger if a non-empty
.I pattern
is specified, or else cancel a trigger if an empty pattern is specified.
@@ -285,6 +285,24 @@ expression (ERE) or (BRE) depending on the current setting.
This is true even if it is recalled from a history entry which had been created
under a different mode.
+If the
+.I pattern
+is preceded by the character
+.B !
+then it is logically inverted. The trigger will activate on lines which do
+.I not
+match the pattern. To write an uninverted pattern which begins with
+.BR ! ,
+precede the
+.B !
+with a backslash. This is not a regex character escape sequence, but part
+of the trigger command syntax. It must not be used anywhere in a pattern,
+other than immediately after the
+.B /
+or
+.B ?
+command character.
+
In trigger mode, the status string
.B TRIG/
or