diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-12-20 12:06:21 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-12-20 12:06:21 +0000 |
commit | 7894ac62ff8595f9620bc3de7ef372e9967510a8 (patch) | |
tree | a8ec72957979e834e3b9870b04bbe57b6344e218 /doc | |
parent | 9957097f4334967bbd1daa361893d2619c60f122 (diff) | |
download | mailutils-7894ac62ff8595f9620bc3de7ef372e9967510a8.tar.gz mailutils-7894ac62ff8595f9620bc3de7ef372e9967510a8.tar.bz2 |
Documented text:[-][delimiter] extension.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/texinfo/libsieve.texi | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/doc/texinfo/libsieve.texi b/doc/texinfo/libsieve.texi index 34eba1621..f93e53232 100644 --- a/doc/texinfo/libsieve.texi +++ b/doc/texinfo/libsieve.texi @@ -757,6 +757,35 @@ text: This results in the contents of file @file{myresponse.txt} being read and interpreted as the contents of the multiline string. +GNU libsieve extends the described syntax as follows. If the keyword +@code{text:} is immediately followed by a dash (@samp{-}), then all +leading tab characters are stripped from input lines and the line +containing delimiter (@samp{.}). This allows multiline strings within +scripts to be indented in a natural fashion. + +Furthermore, if the @code{text:} (optionally followed by @samp{-}) is +immediately followed by a word, this word will be used as ending +delimiter of multiline string instead of the default dot. For +example: + +@example +@group +if header "from" "me@@example.com" + @{ + reject text:-EOT + I do not accept messages from + this address. + . + . + EOT + # Notice that this the multiline string ends here. + # The single dots above will be part of it. + ; + @} +@end group +@end example +@noindent + @item String Lists A @dfn{string list} is a comma-delimited list of quoted strings, enclosed @@ -1623,6 +1652,25 @@ This section summarizes the @sc{gnu} extensions to the sieve language @enumerate 1 +@item Multiline strings syntax + +GNU libsieve understands the following multiline string syntax: + +@example +@group +text:[-][@var{delimiter}] +.... +@var{delimiter} +@end group +@end example + +The meaning of optional flags is the same as in shell ``here document'' +construct: the dash strips all leading tab characters from the string body, +thus allowing it to be indented in a natural fashion; @var{delimiter} +introduces the new end-of-text delimiter instead of the default +dot. If @var{delimiter} starts with a backslash, no preprocessing will +be performed within a string. + @item Handling of the @code{require} statement. @itemize |