Lumail - The console email client


Lua primitives: hostname()

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

This function will attempt to return the name of the current host.

This is a useful function if you're aiming to write configuration files that are portable across a number of hosts, and which need to have conditional handling.

Simple usage would be:

msg(hostname());

NOTE: If you do not like the value returned by this function you can set the environmental variable HOSTNAME.

For example:

$ ./lumail --rcfile ./lumail.lua --eval "abort(hostname()
shelob.my.flat

$ export HOSTNAME=my.host.name
$ ./lumail --rcfile ./lumail.lua --eval "abort(hostname()
my.host.name

Availability

This function has been available since version 0.23.