New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow quitting with double Ctrl+D #45

Merged
merged 1 commit into from Dec 19, 2015

Conversation

Projects
None yet
2 participants
@lucasb-eyer
Contributor

lucasb-eyer commented Dec 7, 2015

I'm used to this feature from IPython/Jupyter and since here you also quit on empty string, I see no harm?

Without this change, doing double Ctrl+D would get the following, which also quits 馃槃

th> Do you really want to exit ([y]/n)? /home.local/lucas/inst/src/torch/install/bin/luajit: ...ucas/inst/src/torch/install/share/lua/5.1/trepl/init.lua:587: attempt to index local 'line' (a nil value)
stack traceback:
    ...ucas/inst/src/torch/install/share/lua/5.1/trepl/init.lua:587: in function 'repl'
    .../src/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
    [C]: at 0x00406670
Allow quitting with double Ctrl+D
I'm used to this feature from IPython/Jupyter and since here you also quit on empty string, I see no harm?

Without this change, doing double Ctrl+D would get:

```
th> Do you really want to exit ([y]/n)? /home.local/lucas/inst/src/torch/install/bin/luajit: ...ucas/inst/src/torch/install/share/lua/5.1/trepl/init.lua:587: attempt to index local 'line' (a nil value)
stack traceback:
	...ucas/inst/src/torch/install/share/lua/5.1/trepl/init.lua:587: in function 'repl'
	.../src/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
	[C]: at 0x00406670
```

soumith added a commit that referenced this pull request Dec 19, 2015

Merge pull request #45 from lucasb-eyer/patch-1
Allow quitting with double Ctrl+D

@soumith soumith merged commit 1ae1458 into torch:master Dec 19, 2015

@soumith

This comment has been minimized.

Show comment
Hide comment
@soumith

soumith Dec 19, 2015

Member

Thanks Lucas.

Member

soumith commented Dec 19, 2015

Thanks Lucas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment