1

I am writing a cmd wrapper which should intercept streams for any cmd application just as any other cmd wrapper would. So far I have succeded and most apps work fine like 'ping' and others. However, when I start Clojure or Scala REPLs, at first everyhtings is OK, but when I enter a multiline function or when I get an error, the messaging stops like if something is stuck in the pipe. Any communication between the REPL and my wrapper stops. Since I channel both stdout and stderr streams of all the apps that I launch through the wrapper, it is unclear to me, what to do in this situation, why does the output not get intercepted?

UPDATE: A new information is suggested by user om-nom-nom, which reveals that Scala and Clojure REPLs are using jline for advanced console interaction handling. So this poses several new questions: Why is working with jline different than with standard streams? Are there any ways to re-route the jline streams in a manner similar to normal streams? What is the best way to work with jline like that?

noncom
  • 4,962
  • 3
  • 42
  • 70

1 Answers1

0

I recommand: https://github.com/Raynes/conch , A simple and flexible library for shelling out in Clojure

number23_cn
  • 4,611
  • 26
  • 31