Lua - get command line input from user?

blocking, lua, user-input, wait

Solution

Take a look at the `io` library, which by default has standard-input as the default input file:

http://www.lua.org/pil/21.1.html

Problem

In my lua program, i want to stop and ask user for confirmation before proceeding with an operation. I'm not sure how to stop and wait for user input, how can it be done?

Original source