Closed bartlomieju closed 1 year ago
Hi all - JT from the Nushell project.
Thanks for looking into reedline. I wanted to share a bit of "full disclosure" for reedline, as you're making your decision. Nushell currently, like deno, uses rustyline. We started up reedline, hopeful that it'd be a good replacement for rustyline for us. Currently, reedline is getting close (we're using it in our upcoming nushell engine rewrite to test it out), but there are a few gaps between it and reedline.
We've got a channel on the Nushell discord called #external-collab which is a great place to jump in and brainstorm with the Nushell and reedline folks about possible changes to reedline. We'd love to chat.
Hi @jntrnr, thanks for reaching out!
We did some preliminary tests with reedline
(CC @crowlKats) and found a major blocker at the moment, is that Reedline
struct is neither Sync
nor Send
. In the REPL we're running the editor on a separate thread (becuase the editor interface is sync) and we use channels for completions (because Deno's LSP and executing code in V8 is an async operation).
I think we'll wait until engine-q
and reedline
are incorporated into main branch of nushell
and get released before making the switch. That said, I'm a huge fan of both nushell
and API for reedline
and this is definitely something I want to explore in Q1 of 2022. I'll reach out on Discord for further conversation.
@bartlomieju - out of curiosity, which direction did you go for line editing?
Hey @jntrnr, due to limited bandwidth we are sticking with rustyline
for now, but we might revisit the topic in the future.
Currently we use
rustyline
crate for the REPL. However there are shortcomings in that crate, mainly it gives us no control over "external prints".If you have code like:
Its output gonna be interleaved with prompt:
Ideally the output would go into line above the prompt line.
https://docs.rs/reedline has all the necessary APIs to fit our purposes and seems to be more battle tested (it's the base for nushell.sh)
This switch would allow us to address: https://github.com/denoland/deno/issues/8049
CC @dsherret