37

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?

Solomon Ucko
  • 5,724
  • 3
  • 24
  • 45
James Bedford
  • 28,702
  • 8
  • 57
  • 64

2 Answers2

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
  • 6
    I'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