2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-05 12:00:16 +00:00
cheat.sheets/sheets/lua
2017-06-02 12:29:36 +00:00

22 lines
597 B
Plaintext

# lua
# A powerful, light-weight embeddable programming language.
# Start an interactive Lua shell:
lua
# Execute a Lua script:
lua script_name.lua --optional-argument
# Execute a Lua expression:
lua -e 'print( "Hello World" )'
# All options are handled in order, except -i. For instance, an invocation like
# first set a to 1, then print the value of a (1), and finally run the file script.lua
lua -e'a=1' -e 'print(a)' script.lua
# See also:
# Lua language cheat sheets at /lua/
# list of pages: /lua/:list
# learn lua: /lua/:learn
# search in pages: /lua/~keyword