Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/trepl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@gmail.com>2015-12-19 11:22:16 +0300
committerSoumith Chintala <soumith@gmail.com>2015-12-19 11:22:16 +0300
commit1ae1458706758122c1358193bd2945e31bddc62c (patch)
treec2b895752a3239739de00cc93f660efc13529c07
parent0aff06c7b3ba291c86fd9e861258e56397885be5 (diff)
parent3c6b32c29a29e4837690e8ec9d445b0d4933dcc7 (diff)
Merge pull request #45 from lucasb-eyer/patch-1
Allow quitting with double Ctrl+D
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 06e57e1..a043fe5 100644
--- a/init.lua
+++ b/init.lua
@@ -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