diff options
author | Soumith Chintala <soumith@gmail.com> | 2015-12-19 11:22:16 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2015-12-19 11:22:16 +0300 |
commit | 1ae1458706758122c1358193bd2945e31bddc62c (patch) | |
tree | c2b895752a3239739de00cc93f660efc13529c07 | |
parent | 0aff06c7b3ba291c86fd9e861258e56397885be5 (diff) | |
parent | 3c6b32c29a29e4837690e8ec9d445b0d4933dcc7 (diff) |
Merge pull request #45 from lucasb-eyer/patch-1
Allow quitting with double Ctrl+D
-rw-r--r-- | init.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -584,7 +584,7 @@ function repl() if not line or line == 'exit' then io.write('Do you really want to exit ([y]/n)? ') io.flush() local line = io.read('*l') - if line == '' or line:lower() == 'y' then + if not line or line == '' or line:lower() == 'y' then os.exit() end end |