beowulf.reader.char-reader

Provide sensible line editing, auto completion, and history recall.

None of what’s needed here is really working yet, and a pull request with a working implementation would be greatly welcomed.

What’s needed (rough specification)

  1. Carriage return does not cause input to be returned, unless a. the number of open brackets ( and closing brackets ) match; and b. the number of open square brackets [ and closing square brackets ] also match;
  2. aborts editing and returns the string STOP;
  3. and scroll back and forward through history, but ideally I’d like this to be the Lisp history (i.e. the history of S-Expressions actually read by READ, rather than the strings which were supplied to READ);
  4. offers potential auto-completions taken from the value of (OBLIST), ideally the current value, not the value at the time the session started;
  5. and offer movement and editing within the line.

TODO: There are multiple problems with JLine; a better solution might be to start from here: https://stackoverflow.com/questions/7931988/how-to-manipulate-control-characters