Node:Scripting, Next:Aliasing, Previous:Editing Messages, Up:Reading Mail
The #
character introduces an end-of-line comment. All characters
until and including the end of line are ignored.
The echo
(ec
) command prints its arguments to stdout.
The command source filename
reads commands from the named
file. Its minimal abbreviation is so
.
The mail variables may be set using set
(se
) command. The
command takes a list of assignments. The syntax of an assignment is
name=string
"
)
name=number
name
True
value.
noname
False
value.
Example:
& set askcc nocrt indentprefix="> "
This statement sets askcc
to True
, crt
to
False
, and indentprefix
to "> ".
To unset mail variables use unset
(uns
) command. The
command takes a list of variable names to unset.
Example:
To undo the effect of the previous example, do:
& unset askcc crt indentprefix
Shell environment may be modified using setenv
(sete
)
command. The command takes a list of assignments. The syntax of an
assignment is:
name=value
name
The conditional statement allows to execute a set of mail commands
depending on the mode the mail
program is in. The conditional
statement is:
if cond ... else ... endif
where ...
represents the set of commands to be executed in each
branch of the statement. cond can be one of the following:
s
mail
is operating in mail sending mode.
r
mail
is operating in mail reading mode.
t
The conditional statements can be nested to arbitrary depth. The minimal
abbreviations for if
, else
and endif
commands are
i
, el
and en
.
Example:
if t set crt prompt="& " else unset prompt endif if s alt gray@farlep.net gray@mirddin.farlep.net set