On Saturday, 17 March 2012 at 03:00:36 UTC, Nathan M. Swan wrote:
In a post from a few weeks ago, someone mentioned terminal
colors. Currently, I have one that works with bash (cmd
pending) at https://github.com/carlor/dcaflib.
Example code:
import dcaflib.ui.terminal;
import std.stdio;
void main() {
fgColor = TermColor.RED;
writeln("this is red!");
fgColor = TermColor.BLUE;
writeln("this is blue!");
}
This worked for me with Ubuntu. Though I had to use rdmd instead
of dmd.
I'm using a version like this for Windows for one of my programs.
I've found with unix OS's you can't edit text very nice at all
using readln(); etc. Windows doesn't have that problem. I don't
even bother with stuff because of it.
-Joel