From 0d76f006b5d5f3dc6c0aa7c320bfa3cf24aa75da Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Thu, 2 Mar 2017 23:35:53 +0100 Subject: [PATCH] TODO: Ideas for how to use editline in an event loop Signed-off-by: Joachim Nilsson --- TODO.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 5f28148..0d5cd99 100644 --- a/TODO.md +++ b/TODO.md @@ -2,12 +2,29 @@ TODO ==== Issues in need of work. Mostly compatibility with GNU readline, BSD -[libedit], and usability improvements. +[libedit][], and usability improvements. Remember, the general idea is to keep this library editline small with no external dependencies, except a C library. +Add support for running in an event loop +---------------------------------------- + +To be able to use libeditline from within an event loop like [libuEv][] +there are few things to do: + +- Refactor `editinput()` and `readline()`. Break out the active code + used for set up and teardown, and the character input logic +- Add bare necessities for external callbacks so that an event loop + that monitors `el_infd` has something to call on events +- GNU Readline has its [alternate interface][gnu] which we should + probably implement + +Example usecase of the GNU alternate interface can be found here: +http://www.mcld.co.uk/blog/blog.php?274 + + Verify custom completion handlers --------------------------------- @@ -46,4 +63,6 @@ Other minor TODO's http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 +[gnu]: http://www.delorie.com/gnu/docs/readline/rlman_41.html#IDX288 +[libuEv]: https://github.com/troglobit/libuev/ [libedit]: http://www.thrysoee.dk/editline/