Am 2015-06-18 12:23, schrieb Alan Mackenzie:
Hello, mutt.
I'm using mutt 1.5.23.
The default value of the configuration variable index_format is
"%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s".
My personal value is similar. The construct "(%?l?%4l&%4c?)" puzzles
me. The parentheses are literal characters, but what do all the ?s
mean? In practice, this displays the number of lines in the email,
what
one would expect from a simple %l. I also have the feeling that the &
is not a literal character either. What does it mean?
I've looked in the manual, at the section documenting index_format, but
the ?s aren't explained there. I've also checked the printf(3) man
page, but there isn't a single ? in it.
Elucidation would be much appreciated. Thanks!
This is described briefly in the manual below status_format:
<snip>
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.
</snip>
Best,
Christian