wavesoft / local-echo

A local-echo controller for xterm.js
Apache License 2.0
142 stars 71 forks source link

Make isIncompleteInput pluggable #30

Open borkdude opened 4 years ago

borkdude commented 4 years ago

Hi, thanks for this library! I'm using it at https://babashka.org/xterm-sci/ to host a Clojure REPL. In Clojure single quotes should not be balanced, but are treated as a way to mark forms as literal expressions instead of evaluating them.

E.g.:

'(+ 1 2 3)

means: I want the list (+ 1 2 3) and not the number 6.

Is it possible to opt out of the need that quotes need to be balanced before seeing the input that the user typed by providing our own function? I am handling the reading of incomplete output myself right now also for other cases (e.g. parens aren't balanced).

The source code is at https://github.com/babashka/xterm-sci.

Fixed with PR #31.