diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-01-22 20:04:50 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-01-22 20:04:50 +0100 |
commit | 167d40913908562af9e38f233481cbc528f9a904 (patch) | |
tree | 3d640e5d44a92936dacdebd4a7596dd320a6aa63 /man | |
parent | 53fbc50fa5dd0ae712c202d7c7dfda62e39bc2c4 (diff) |
Document the behavior of an empty h//
Diffstat (limited to 'man')
-rw-r--r-- | man/grab.1 | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -209,6 +209,23 @@ filters out the specific number 1337. As you may use whichever delimiter you like, the following is also valid: .Pp .Dl x|[0\-9]+| g.3. G#^1337# +.Pp +Operators are not allowed to take empty regular expression arguments with +one exception: +.Sq h . +When given an empty regular expression argument, +the +.Sq h +operator assumes the same regular expression as the previous operator. +This allows you to avoid duplication in the common case where a user +wishes to highlight text matched by a +.Sq g +operator. +The following example pattern selects all words that have a capital +letter, +and highlights the capital letter(s): +.Pp +.Dl x/\ew+/ g/[A\-Z]/ h// .Sh ENVIRONMENT .Bl -tag -width GRAB_COLORS .It Ev GRAB_COLORS |