From: Rocco Rutte Date: Mon, 30 Mar 2009 11:18:26 +0000 (+0200) Subject: Manual: Add section about zeroprinting format strings to format string section X-Git-Tag: neomutt-20160307~701^2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4bc9e5cb38be97dbae191a1c915e32eca3c10e1;p=neomutt Manual: Add section about zeroprinting format strings to format string section --- diff --git a/doc/manual.xml.head b/doc/manual.xml.head index b66a0a4de..fdc3f5ece 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -4007,6 +4007,54 @@ replace all decimal points with underlines. + +Conditionals + + +Depending on the format string variable, some of its sequences can be +used to optionally print a string if their value is nonzero. For +example, you may only want to see the number of flagged messages if such +messages exist, since zero is not particularly meaningful. To optionally +print a string based upon one of the above sequences, the following +construct is used: + + + +%?<sequence_char>?<optional_string>? + + +where sequence_char is an expando, and +optional_string is the string you would like printed if +sequence_char is nonzero. +optional_string may contain other +sequences as well as normal text, but you may not nest optional +strings. + + + +Here is an example illustrating how to optionally print the number of +new messages in a mailbox in +$status_format: + + + +%?n?%n new messages.? + + +You can also switch between two strings using the following construct: + + + +%?<sequence_char>?<if_string>&<else_string>? + + +If the value of sequence_char is +non-zero, if_string will be expanded, +otherwise else_string will be expanded. + + + + Filters