Changes between Initial Version and Version 1 of Filters


Ignore:
Timestamp:
Sep 14, 2008, 3:32:02 PM (16 years ago)
Author:
nelhage@MIT.EDU
Comment:

Import most of advanced.txt

Legend:

Unmodified
Added
Removed
Modified
  • Filters

    v1 v1  
     1[Much of this documentation is cloned from `doc/advanced.txt` in the `owl` repository]
     2
     3BarnOwl supports an expressive filter language that can be used to
     4describe sets of messages. This language is used both for coloring
     5messages and for selectively viewing subsets of your messages.
     6
     7The following command will create a filter called 'mail' that maches
     8any messages sent to the zephyr class 'mail':
     9
     10{{{     filter mail class ^mail$  }}}
     11
     12The first argument after the filter command specifies the name of the
     13filter to be created.  The text after that indicates that matching
     14messages must have the zephyr class "mail".  For help understanding
     15the `^` and `$` characters, consult a reference on POSIX regular
     16expressions, such as `man 7 regex` or an
     17[http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html online version].
     18Note that all pattern matching in Barnowl is case-insensitive.
     19
     20The message fields that can be used in a filter command include:
     21
     22 sender::
     23   message sender
     24 recipient::
     25   message recipient
     26 class::
     27   zephyr class name
     28 instance::
     29   zephyr instance name
     30 opcode::
     31   zephyr opcode
     32 realm::
     33   zephyr realm
     34 body::
     35   message body
     36 type::
     37   message type ('zephyr', 'aim', 'admin', ...)
     38 direction::
     39   either 'in' 'out' or 'none'\n"
     40 login::
     41   either 'login' 'logout' or 'none'\n"
     42
     43The `info` command (bound to `i` by default) includes a list of “Owl
     44Message Attributes”; Any attribute listed in this area can also be
     45matched on by a filter.
     46
     47A filter can refer to other filters using the `filter` command:
     48
     49{{{   filter somefilt filter foo or filter bar}}}
     50
     51Would match anything in either the `foo` or `bar` filters. Recursive
     52filters are explicitly disallowed.
     53
     54You can also use the operators 'and' 'or' and 'not' as well as the
     55values 'true' and 'false'.  Parentheses can be used to group
     56expressions, though there must be spaces present before and after all
     57parenthesis.  For example:
     58
     59{{{   filter myfilt ( class ^foo$ ) or ( class ^quux$ and instance ^bar$ )}}}
     60
     61If you define a filter using a filter name that already exists, it
     62will overwrite the existing filter.  This can be a useful way to
     63override the built-in filters.
     64
     65== Built-in special filters ==
     66
     67 all::
     68   Matches all messages
     69 none::
     70   Matches no messages
     71 personal::
     72   “personal” messages, messages sent privately to you.
     73 login::
     74   Login/Logout notifications
     75 auto::
     76   Messages generated by automated programs
     77 out::
     78   Messages sent from you to another user
     79 aim::
     80   AIM messages
     81 zephyr::
     82   Zephyr messages
     83 trash::
     84   "Trash" messages
     85 ping::
     86   Zephyr pings
     87 reply-lockout    Messages for which the reply commands should not work
     88
     89
     90The `trash` filter is used for the `delete trash` command (bound to
     91`T`). That command will mark as deleted (but not expunge) all messages
     92in the `trash` filter. By default, this filter matches messages
     93on `-c mail`, admin messages, pings, and login notifications.
     94
     95The `reply-lockout` filter can be used to prevent you from
     96accidentally replying to classes you do not want to ever send to. By
     97default it includes class `mail` and class `noc`, both of which are
     98used for automatic notifications but which users generally never send
     99to themselves.