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

Readline.bind_key doesn't work #7117

Closed
faustinoaq opened this issue Nov 26, 2018 · 3 comments
Closed

Readline.bind_key doesn't work #7117

faustinoaq opened this issue Nov 26, 2018 · 3 comments

Comments

@faustinoaq
Copy link
Contributor

faustinoaq commented Nov 26, 2018

By example:

require "readline"

Readline.bind_key('a') do
  puts "Hi!"
end

sleep

Shows:

Error in keysignal.cr:3: expected block to return Int32, not Nil

Readline.bind_key('a') do

So, I tried this:

require "readline"

Readline.bind_key('a') do
  puts "Hi!"
  0
end

sleep

and it compiles, but it doesn't detect a keyword

Ref: #1290 (comment)

Version:

[main@pc ~]$ crystal -v
Crystal 0.27.0 (2018-11-02)

LLVM: 6.0.1
Default target: x86_64-pc-linux-gnu
@jwoertink
Copy link
Contributor

I've had issues with the Readline stuff in the past. I remember seeing something like the core team has no one that knows readline that well, and there was even some talk of pulling it out of the core.

Just for anyone that comes across this, if you know readline, or are willing to give it a shot, this lib could use some seriously love. It could even potentially help us toward having a real(ish) REPL.

@RX14
Copy link
Contributor

RX14 commented Nov 28, 2018

Readline is going to go. I just need to get around to pulling it out.

@RX14
Copy link
Contributor

RX14 commented Mar 22, 2020

Not relevant any more, see #8364

@RX14 RX14 closed this as completed Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants