DEFINEVAR is used for creating user-defined resource variables. DEFINEVAR can be defined on the command-line or in the resource file.
On the command-line, the option is called
The following argument after
is treated as a variable specification list. The specification list
is a string containing name/value pairs with the following format:
Multiple name/value pairs are separated
If VALUE contains whitespace, then it must be surrounded
by quotes to prevent the command shell from treating the string
as multiple arguments.
-definevar options can be specified on the
command-line. This can help reduce the ugliness of specify mutliple
variable definitions with a single option.
If you intend to include resource variables as part of the VALUE, you may need to escape the '$' characters (and possible other characters) to prevent interpolation by the command shell. See your command shell documentation for more information.
In a resource file the <DEFINEVAR> element may occur mutliple times to define multiple variables. The first line of the <DEFINEVAR> element is the name of the variables. All subsequent lines represent the content of the variable. If you do not want the last newline of a <DEFINEVAR> element content to be part of the defined variable content, then specify the chop attribute.
The following is a simple example of defining a variable to represent the base text for the title of an archive:
<DefineVar chop> MAIN-TITLE Comp.lang.perl.misc </DefineVar>
Now, the variable can be refernced as follows:
<TTitle chop> $MAIN-TITLE$ (thread) </TTitle>
If you wanted to use the same resource file for multiple arcvhives
it may better to define
$MAIN-TITLE$ on the command-line
% mhonarc -definevar MAIN-TITLE='mhonarc mailing list' ...