diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-04-29 22:40:54 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-04-29 22:40:54 -0700 |
commit | febd3df761d05ff94a775f4325cbb32f877779d9 (patch) | |
tree | 69ef81a4973e786c1b3ffcfcac735b14dee41689 /pw.1 | |
parent | c4667ee965f35759454355a3440996d0b804c101 (diff) | |
download | pw-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.1 | 37 |
1 files changed, 33 insertions, 4 deletions
@@ -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 |