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

FULL DISCUSSION
 

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

- IO.write("\r#{Progress.bar(task, total)}")
+ IO.write("\e[1G#{Progress.bar(task, 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