Lumail - The console email client


Lua primitives: index_format()

NOTE: Lumail-legacy has been superseded by Lumail 2.x, which has a wholly unified Lua API.

A simple format-string is used to control how message-lists are displayed, this format string is fetched/updated via the index_format() function.

The value can be set or retrieved like so:

-- Set the string
index_format( "[$FLAGS] - $SUBJECT" );

-- Get the setting, and display it
msg( index_format() );

The format string clearly makes use of variables like "$SUBJECT" to display particular pieces of information about the message. The following table lists possible values:

$DATEThe date the message was sent/received.
$DAYThe day of the month the message was sent/received.
$FLAGSThe Maildir flags the given message possesses.
$FROMThe sender of the message.
$MONTHThe month the message was sent/received.
$MONThe abbreviated version of the month the message was sent/received.
$SUBJECTThe subject of the message.
$TOThe recipient of the message.
$YEARThe year the message was sent/received.

Availability

This function has been available since version 0.07.

See Also

See also date_formats, get_variables, maildir_format.