1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
.TP
tag [\fIboolean\fP] ["\fIstring\fP"]
Enable, disable, or set the tag for the
.IR "selected slot" .
If the slot is not a combination slot, a tag
.I string
may be set (the quotes are required).
If a tag string is set and enabled for a file, the string is
prepended to each matching output line printed.
Unlike the
.I filter
and
.I modify
commands which automatically enable the function when a parameter is
set, a
.I tag
is not automatically enabled when set.
It can be enabled while being set via\c
.Q 'tag on \"text:\"'
or could be enabled subsequently via just\c
.Q "tag on"
If the selected slot is a combination slot, only the enable/disable
status may be changed (on by default). No tag string may be set.
The reason for the special treatment lies in the special nature of
how tags work in conjunction with combination files.
During a search when the selected slot is a combination slot, each
file which is a member of the combination has its per-file flags
disabled if their corresponding flag is disabled in the original
combination slot. This allows the combination slot's flags to act
as a\c
.Q mask
to blot out each component file's per-file flags.
The tag flag, however, is special in that the component file's tag
flag is turned
.I on
if the combination slot's tag flag is turned on (and, of course, the
component file has a tag string registered).
The intended use of this is that one might set a (disabled) tag to a
file, yet
.I direct
searches against that file will have no prepended tag.
However, if the file is searched as part of a combination slot (and
the combination slot's tag flag is on), the tag
.I will
be prepended, allowing one to easily understand from which file an
output line comes.
|