Lumail - The console email client

Lua primitives: completion_chars()

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

When the prompt() function is used for input we have TAB-completion support present.

The TAB-completion code will tokenize input to allow completion to be used "sensibly". For example we want to complete arguments within strings, and parameters to code.

Because we split the input-text into tokens and complete at the point of the cursor we can complete in the following situation:


This completes the text "edit" to editor, as you would expect.

You might prefer to only separate input based on spaces, or some other characters such as ",".

By default the input is split when any of the following characters are encountered: [space] " ' ,


This function has been available since version 0.16.

See Also

See also on_complete, on_key.