drepl icon indicating copy to clipboard operation
drepl copied to clipboard

port linenoise to D

Open MartinNowak opened this issue 11 years ago • 7 comments

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

MartinNowak avatar Feb 12 '14 21:02 MartinNowak

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

John-Colvin avatar May 12 '14 10:05 John-Colvin

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

MartinNowak avatar May 12 '14 15:05 MartinNowak

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.

John-Colvin avatar May 21 '14 10:05 John-Colvin

:+1:

MartinNowak avatar May 21 '14 14:05 MartinNowak

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

MartinNowak avatar Sep 10 '14 19:09 MartinNowak

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?

wilzbach avatar May 24 '16 21:05 wilzbach

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.

MartinNowak avatar May 27 '16 12:05 MartinNowak