wiki:Doc/Category
Warning: Can't synchronize with repository "(default)" (Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? ). Look in the Trac log for more information.
Last modified 7 years ago Last modified on 07/22/2010 11:17:41 PM

Categories

They are defined in the cats section of the config file.

Example

An example of that section is the following:

xelway = shell x11 notebook
vjun = shell x11 minimal
fkz gwz = br
br: shell
x11 && !minimal = compiz

These rules will expand to the following lists:

hostname categories
xelway shell x11 notebook compiz
vjun shell x11 minimal
fkz br shell
gwz br shell

Syntax

A rule in that section has two parts, separated with either a : or a =. The left part is a simple or complex expression, built as follow:

  • Simple expression: cat1 cat2 cat3, which is equivalent to cat1 or cat2 or cat3
  • Complex expression: cat1 && (cat2 or !cat3): the logical connectors allowed are !, &&, ||, (, ), and, or, not.

The right part is a simple, space separated list of categories. For a given host, if the current list of categories (read from top to bottom) matches the left-hand side, then the right-hand list of categories is added to the current list.

Files

The [files] section of config follows the exact same syntax.

The only difference lies in the processing: whereas, for cats, the targets of each rule are added to the active categories, for file, the targets are added to the list of files, and do not modify the active categories.