re: Cool CLIs in Elixir with IO.write/2 VIEW POST


I honestly doubt it’ll be working on Windows and/or legacy MacOS. The correct cursor move would be \[1G.

- IO.write("\r#{, total)}")
+ IO.write("\e[1G#{, total)}")

You’d better try to understand why this code is not robust enough, rather than claim it “works on my machine.”

code of conduct - report abuse