Build your own Command Line with ANSI escape codes

I wanted to add some terminal output styling to a work project, but the ANSI color codes just would not work. A quick search lead me to this awesome article by Li Haoyi, Build your own Command Line with ANSI escape codes. His post gave me just what I needed, and pushed me to make First Crack’s command line interface a bit better by adding support for cursor navigation. It took some fiddling, but thanks to a helpful tip from commenter dkrmr, I got it working.

I did not plan on linking to his article, but after referencing it for two days, I came around. Li pulls off some pretty cool stuff with some pretty basic tools. Very cool.

Permalink.