doesn't quit with ^D, ^C cancels process instead of current line
Currently ^D will send the current line if it's not-empty, but when used on an empty line it prints the prompt right after the current.
^C seems to always quit the with prompt rather than starting a new prompt line.
I'm not sure if this is desired/intended behavior, but in my experience most/all interactive shells seem to respond this way.
The ^D behaviour is strange. It should quit.. In my experience ^C depends on the tool. in ghci and python it starts a new line and in sbt it quits as well. I'll look into the ^D issue.
I faced the same problem too. I think this problem has been caused by this last part.
while true ; do
run_with
done
When ^D entered, process exit run_with normally.
But it enter run_with once again because run_with surrounded by while true; do ... done.
If it isn't necessary to surround, this problem will be solved by removing this surround.