gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source
https://gno.land/
Other
849 stars 345 forks source link

[REPL] Cursor navigation and history #1416

Open x1unix opened 7 months ago

x1unix commented 7 months ago

Description

Most REPLs like ipython, node, etc. support cursor and history navigation using arrow keys. Currently, REPL mode (gno repl) is missing this functionality.

image

Gno repl doesn't handle arrow keys

Suggestions

Maybe smth like go-readline can be useful.

thehowl commented 7 months ago

FYI, when I'm in my terminal, I use rlwrap to do this: https://github.com/hanslub42/rlwrap

Nevertheless, let's add this as a native REPL feature :)