Configuration Pathname

From Mailutils
Revision as of 11:21, 5 November 2011 by Gray (talk | contribs) (Created page with "'''Mailutils''' configuration files have a distinct hierarchical structure. Each statement in such files can therefore be identified by its name and the names of block statement...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Mailutils configuration files have a distinct hierarchical structure. Each statement in such files can therefore be identified by its name and the names of block statements containing it. Such names form this statement pathname, similar to that used, e.g. by UNIX file system.

For example, consider the following file:

foo {
  bar {
    baz 45;   # (A)
  }
  baz 98;     # (B)
}

The full pathname of the statement marked with (A) can be written as:

.foo.bar.baz

Similarly, the statement marked with (B) has the following pathname:

.foo.baz

The default path component separator is dot. A pathname beginning with a component separator is called absolute pathname. Absolute pathnames uniquely identify corresponding statements. If the leading dot is omitted, the resulting pathname is called relative. Relative pathnames identify statements in relation to the current point of reference in the configuration file.

Any other punctuation character can be used as a component separator, provided that it appears at the beginning of the pathname. In other words, only absolute pathnames allow for a change in component separators.

A block statement that has a tag is referred to by its name, followed by an equals sign, followed by the tag value. For example, the statement (A) in the file below:

program x {
  bar {
    baz 45;   # (A)
  }
}

is identified by the following pathname:

.program=x.bar.baz

The tag can optionally be enclosed in a pair of double quotes. Such a quoting becomes mandatory for tags that contain white space or path component separator, e.g.:

.program="a.out".bar.baz