My question is quick. I work on a small console to read input, and then calling the appropriate code. I use sbt, and I ran into a problem when trying to read input after starting my program with sbt running, inside the sbt console or even in the regular old scala interpreter.
It seems that the prompt just hangs, but if I press return, it really reads the input. Although the shell buffer remains empty. Here is the generic code I tried that gave me this problem.
import java.io._ val s = new BufferedReader(new InputStreamReader(System.in)) val line = s.readLine println(line)
Does anyone know why this is, and if there is a way to fix it? I would like to see what I type when I run my program from sbt. Not seeing how I type in the shell, it makes testing and developing my project much less enjoyable.
source share