Sortix cross-nightly manual
This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.
LUA(1) | General Commands Manual | LUA(1) |
NAME
lua - Lua interpreterSYNOPSIS
lua [ options ] [ script [ args ] ]DESCRIPTION
lua is the standalone Lua interpreter. It loads and executes Lua programs, either in textual source form or in precompiled binary form. (Precompiled binaries are output by luac, the Lua compiler.) lua can be used as a batch interpreter and also interactively.OPTIONS
- -e stat
- execute statement stat.
- -i
- enter interactive mode after executing script.
- -l mod
- require library mod into global mod.
- -l g=mod
- require library mod into global g.
- -v
- show version information.
- -E
- ignore environment variables.
- -W
- turn warnings on.
- --
- stop handling options.
- -
- stop handling options and execute the standard input as a file.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of lua. When defined, the version-specific variants take priority and the version-neutral variants are ignored.- LUA_INIT, LUA_INIT_5_4
- Code to be executed before command line options and scripts.
- LUA_PATH, LUA_PATH_5_4
- Initial value of package.path, the path used by require to search for Lua loaders.
- LUA_CPATH, LUA_CPATH_5_4
- Initial value of package.cpath, the path used by require to search for C loaders.
EXIT STATUS
If a script calls os.exit, then lua exits with the given exit status. Otherwise, lua exits with EXIT_SUCCESS (0 on POSIX systems) if there were no errors and with EXIT_FAILURE (1 on POSIX systems) if there were errors. Errors raised in interactive mode do not cause exits.DIAGNOSTICS
Error messages should be self explanatory.SEE ALSO
luac(1)AUTHORS
R. Ierusalimschy, L. H. de Figueiredo, W. Celes$Date: 2024/05/08 18:48:27 $ |