]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Lua/doc/lua.1
BaseTools/BinToPcd: Fix Python 2.7.x compatibility issue
[mirror_edk2.git] / AppPkg / Applications / Lua / doc / lua.1
CommitLineData
16a5fed6 1.\" $Id: lua.man,v 1.13 2011/11/16 17:16:53 lhf Exp $
2.TH LUA 1 "$Date: 2011/11/16 17:16:53 $"
3.SH NAME
4lua \- Lua interpreter
5.SH SYNOPSIS
6.B lua
7[
8.I options
9]
10[
11.I script
12[
13.I args
14]
15]
16.SH DESCRIPTION
17.B lua
18is the standalone Lua interpreter.
19It loads and executes Lua programs,
20either in textual source form or
21in precompiled binary form.
22(Precompiled binaries are output by
23.BR luac ,
24the Lua compiler.)
25.B lua
26can be used as a batch interpreter and also interactively.
27.LP
28The given
29.I options
30are handled in order and then
31the Lua program in file
32.I script
33is loaded and executed.
34The given
35.I args
36are available to
37.I script
38as strings in a global table named
39.BR arg .
40If no options or arguments are given,
41then
42.B "\-v \-i"
43is assumed when the standard input is a terminal;
44otherwise,
45.B "\-"
46is assumed.
47.LP
48In interactive mode,
49.B lua
50prompts the user,
51reads lines from the standard input,
52and executes them as they are read.
53If a line does not contain a complete statement,
54then a secondary prompt is displayed and
55lines are read until a complete statement is formed or
56a syntax error is found.
57If a line starts with
58.BR '=' ,
59then
60.B lua
61evaluates and displays
62the values of the expressions in the remainder of the line.
63.LP
64At the very start,
65before even handling the command line,
66.B lua
67checks the contents of the environment variables
68.B LUA_INIT_5_2
69or
70.BR LUA_INIT ,
71in that order.
72If the contents is of the form
73.RI '@ filename ',
74then
75.I filename
76is executed.
77Otherwise, the string is assumed to be a Lua statement and is executed.
78.SH OPTIONS
79.TP
80.BI \-e " stat"
81execute statement
82.IR stat .
83.TP
84.B \-i
85enter interactive mode after executing
86.IR script .
87.TP
88.BI \-l " name"
89execute the equivalent of
90.IB name =require(' name ')
91before executing
92.IR script .
93.TP
94.B \-v
95show version information.
96.TP
97.B \-E
98ignore environment variables.
99.TP
100.B \-\-
101stop handling options.
102.TP
103.B \-
104stop handling options and execute the standard input as a file.
105.SH "SEE ALSO"
106.BR luac (1)
107.br
108The documentation at lua.org,
109especially section 7 of the reference manual.
110.SH DIAGNOSTICS
111Error messages should be self explanatory.
112.SH AUTHORS
113R. Ierusalimschy,
114L. H. de Figueiredo,
115W. Celes
116.\" EOF