aboutsummaryrefslogtreecommitdiffstats
path: root/pw.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-04-29 22:40:54 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-04-29 22:40:54 -0700
commitfebd3df761d05ff94a775f4325cbb32f877779d9 (patch)
tree69ef81a4973e786c1b3ffcfcac735b14dee41689 /pw.1
parentc4667ee965f35759454355a3440996d0b804c101 (diff)
downloadpw-febd3df761d05ff94a775f4325cbb32f877779d9.tar.gz
pw-febd3df761d05ff94a775f4325cbb32f877779d9.tar.bz2
pw-febd3df761d05ff94a775f4325cbb32f877779d9.zip
Use BRE by default, with optional ERE.
Diffstat (limited to 'pw.1')
-rw-r--r--pw.137
1 files changed, 33 insertions, 4 deletions
diff --git a/pw.1 b/pw.1
index c651588..afaaa62 100644
--- a/pw.1
+++ b/pw.1
@@ -30,7 +30,7 @@
pw \- Pipe Watch: monitor recent lines of output from pipe
.SH SYNOPSIS
-command | pw [-i interval] [-l interval] [-n number-of-lines] [-d]
+command | pw [-i interval] [-l interval] [-n number-of-lines] [-dEB]
.SH DESCRIPTION
.I pw
@@ -210,7 +210,8 @@ the top of the display. In tail trigger mode, the status string
appears, showing the pattern preceded by a question mark.
The
.I pattern
-is an extended regular expression (ERE).
+is interpreted as either an extended regular expression (ERE)
+or (BRE) depending on the current setting.
Trigger patterns saved in a history which may be navigated for
recall using the up and down arrow keys or
.B Ctrl-P
@@ -271,7 +272,7 @@ pattern onto the grep stack. The
command pushes a plain pattern; the
.B :v
command pushes a logically inverted pattern. The grep stack holds up to 64
-patterns, which are extended regular expressions (EREs).
+patterns.
If the pattern is successfully pushed onto the stack, it
restricts which lines are admitted into the FIFO and available for display.
The plain pattern admits only the lines which match
@@ -318,7 +319,18 @@ command option for the argument format and the
option for the semantics.
.PP
-Any other command results in a brief error message.
+.IP "\fB:E\fP, \fB:B\fP"
+Enable extended regular expressions (EREs) or basic regular expressions (BREs),
+respectively. If no
+.B -E
+option is given to the program, then BRE mode is in effect on start up.
+This setting does not affect the meaning of patterns that are currently in
+effect in the grep stack or in the trigger. The setting affects new patterns
+that will subsequently be presented to the program. Note that the currently
+active patterns shown in the status line are not accompanied by any indication
+of whether they were compiled as ERE or BRE.
+
+Any other command string results in a brief error message.
.SH OPTIONS
@@ -369,6 +381,23 @@ and staying in the interactive mode. This is useful when the last portion
of the input is of interest, and contains long lines that require
horizontal scrolling.
+.IP \fB-E\fP
+Enable extended regular expressions (EREs). By default, regular expressions
+processed by
+.I pw
+are treated as basic regular expressions (BREs). The mode can be switched
+at run time using the
+.B :E
+and
+.B :B
+commands.
+
+.IP \fB-B\fP
+Disable extended regular expressions (EREs), switching to basic (BREs). Since
+that is the default, this option has no effect unless it appears after a
+.B -E
+option.
+
.SH TERMINATION STATUS
If