glua

command
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Command glua is a Lua 5.5 interpreter powered by go-lua.

Usage:

glua [options] [script [args...]]

Options:

-e "code"   Execute the given Lua code
-l name     Require library 'name' before executing scripts
-i          Enter interactive REPL mode after executing scripts
-v          Print version information and exit
-           Read script from standard input

When invoked with no arguments, glua enters interactive REPL mode. Multiple -e and -l flags can be combined; they execute in order.

The REPL supports expression evaluation: typing an expression like "1+2" automatically prints the result (wraps in "return <expr>" internally). Multi-line input is supported — if a statement is incomplete, the prompt changes to ">> " and waits for more input.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL