| PLUMBING(6) | Games Manual | PLUMBING(6) |
plumbing - plumbing rules
Plumbing rules tell plumber (8) how to route plumbing messages generated by applications using plumbmsg (2).
The file is a set of rules separated by blank lines. Each rule is a set of patterns followed by a set of actions. The rules are interpreted in order. The first rule whose patterns all match is applied, and no further rules are examined. Comments start with # and continue to end of line. Single quotes protect special characters (use '' to get a single quote).
A pattern has the general form:
Each field corresponds to a field in the incoming plumbing message:
The verbs are:
The arg can refer to one of the following variables:
The following actions are provided:
For example, the following rule sends the names of module files- file names ending with suffix `.m'- to wm-brutus (1), starting it if it is not already running:
kind is text
data matches '([a-zA-Z0-9]+.m)(:[0-9]+)?'
data isfile /module/$1
data set /module/$0
plumb to edit
plumb start /dis/wm/brutus.dis $file$2
Note the use of $2 in the start action to pass brutus the line number selected by the second parenthesised expression in the pattern.
/usr/user/lib/plumbing