Lumail - The console email client


Lua primitives: completion_chars()

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:

msg(edit[TAB]

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] " ' ,

Availability

This function has been available since version 0.16.

See Also

See also on_complete, on_key.