I've tried to the word "quit" on a single line but this seems to simply change the command line pointer from a ">" to a ">>". What's the best way to end a session in interactive Lua please?
Asked
Active
Viewed 2.4k times
37
-
4The prompt changed to `>>`, because it expected an expression. – Feb 10 '11 at 19:44
-
2I like >> better for a prompt .. so maybe I'll type 'quit' to get that. – WestCoastProjects Dec 12 '15 at 04:09
2 Answers
71
There is no quit
keyword. Try control-D in Unix, control-Z in Windows or os.exit()
if you must.

lhf
- 70,581
- 9
- 108
- 149
-
6I've found one situation where only `os.exit()` works: the interactive lua shell of the [lua.c32 syslinux module](http://www.syslinux.org/wiki/index.php/Lua.c32). – Martin von Wittich Feb 16 '15 at 16:27
0
Typing a full-stop/dot in the lua prompt works in my system -
Console# lua
lua>.
Console# lua
lua>hello
lua>>.
Console#

Dijo John
- 55
- 4