Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linenoise returned nil [IOError] / Allow Ctrl+D to quit the Interactive shell #9

Closed
kaushalmodi opened this issue Apr 18, 2018 · 3 comments
Labels
wontfix This will not be worked on

Comments

@kaushalmodi
Copy link
Contributor

IPython for example allows Ctrl + D to quit it.

Doing that in INim gives:

INim 0.2.0
Nim Compiler Version 0.18.1 [Linux: amd64] at /home/kmodi/stowed/bin/nim
>>>
inim.nim(141)            inim
inim.nim(78)             runForever
rdstdin.nim(83)          readLineFromStdin
Error: unhandled exception: Linenoise returned nil [IOError]
@AndreiRegiani
Copy link
Member

This is related to an open issue in Nim's stdlib module rdstdin (which uses Linenoise C library)
nim-lang/Nim#5795

For a "clean" exit use the command exit or quit().
Let's leave this issue opened until stdlib is fixed.

@AndreiRegiani AndreiRegiani changed the title Allow Ctrl+D to quit the Interactive shell Linenoise returned nil [IOError] / Allow Ctrl+D to quit the Interactive shell Apr 24, 2018
@AndreiRegiani AndreiRegiani added the wontfix This will not be worked on label Apr 24, 2018
@AndreiRegiani
Copy link
Member

I realized I could just handle the IOError exception, so it's all good for INim.
Released v0.2.3 with this fix, please update with nimble install inim

Fix: 91c2d1a

@kaushalmodi
Copy link
Contributor Author

Awesome! Thank you, I confirm the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants