dlang-community / drepl

A REPL for D
Boost Software License 1.0
78 stars 20 forks source link

port linenoise to D #10

Open MartinNowak opened 10 years ago

MartinNowak commented 10 years ago

It's a very small library, so porting this will make a useful D library and gets rid of an external dependency.

John-Colvin commented 10 years ago

I'm in the process of doing this, I'll let you know as it progresses.

MartinNowak commented 10 years ago

Great news, it's a really neat library that may benefit many projects.

John-Colvin commented 10 years ago

This has been delayed a little as I've changed my focus. Current plan:

1) Simple unicode-correct (at very least UTF-*) line-editing library in idiomatic D. No global state, can operate multiple terminals independently. Status: Surprisingly easy and currently 50% complete (the logic is mostly done, the API needs designing).

2) Provide a C API to the library: a simple, small, unicode-aware line editing library is a useful tool outside of D.

3) Provide the linenoise API, i.e. the library becomes a dropin replacement for linenoise.

MartinNowak commented 10 years ago

:+1:

MartinNowak commented 10 years ago

Just saw that MongoDB uses an improved version of linenoise, that apparently supports reverse search and Windows. https://github.com/mongodb/mongo/blob/master/src/mongo/shell/linenoise.cpp

wilzbach commented 8 years ago

This has been delayed a little as I've changed my focus. Current plan:

@John-Colvin did you ever finish the pure D console library?

MartinNowak commented 8 years ago

I think porting the MongoDB fork of linenoise would be a good option. Nowadays I'm using fish-shell (which has a nicer auto-completion and history), maybe they have some nice terminal code to port as well.