goby-lang / goby

Goby - Yet another programming language written in Go
MIT License
3.49k stars 171 forks source link

Going back REPL history with ↑ arrow key #233

Closed hachi8833 closed 7 years ago

hachi8833 commented 7 years ago

Extracted from #177.

Command history with up arrow key is not working for now:

^[[A^[[A

st0012 commented 7 years ago

@hachi8833 I have no idea how to implement this, if you know you can give it a try 😅

hachi8833 commented 7 years ago

Memo: looks like the simple https://github.com/bobappleyard/readline would help us. This depends on external readline lib, which is also used in Ruby.

Also found https://github.com/chzyer/readline (pure readline written in Go) but looks a little bit overkill.

hachi8833 commented 7 years ago

I found that https://github.com/bobappleyard/readline uses cgo and looks not good for Goby. (I think one of the advantage is C-lang dependent)

st0012 commented 7 years ago

This has been implemented by @hachi8833