You need to activate ansi control code processing. See here for more details.
Jason carns in a shell
Using git on windows for more than three years, I fell in love with the command line again. Bash, of course, is not on the Windows command line. Beautiful, ubiquitous, warty bash. git is heavily dependent on GNU utilities, so on Windows it requires either cygwin or msys. Having been burned by cygwin in the past, I prefer the minimalism and simplicity of msys + mingw. Along with git, the entire ruby ecosystem lives in a shell. However, numerous tools, gems, and utilities that accept the standard ANSI color support in the shell began to be worn on me. And so, there is a great solution to support ansi color support for bash (and cmd) on Windows: ansicon.
Download zip and extract . There are several installation methods:
Extract to a permanent location (I use C: / bin / ansicon). Run ansicon.exe -i from the appropriate directory of your system (x86 / x64), and you will install everything. Any new shells (bash and Windows cmd are included) will authorize the ansicon utility to display color output. Be sure not to move the executable file before running ansicon.exe -u. This removes the registry entry and prevents the ugly error message for each shell.
Alternatively, put the ansicon executable in your PATH or add its location in PATH . You can then start ansicon for the session with ansicon.exe –p .
This utility works fine for me on Windows XP. I had problems with its work in Windows 7, but I heard that it should be supported. If you solve a problem with Windows 7, post an error message.
Update
The root cause is uncovered ! If you use JRuby with a 64-bit JVM on Windows x64, ansicon will not work. The problem is that ansicon (64-bit) is able to inject into 32-bit processes, but not vice versa. The JRuby launcher is currently a 32-bit executable. Thus, if you use a 64-bit shell (cmd, Bash or otherwise), ansicon will correctly enter this process. It will then be successfully integrated into the 32-bit JRuby startup process. At the moment, for all purposes and tasks, you are using the 32-bit version of ansicon. Thus, if you run JRuby on a 64-bit JVM, then 32-bit ansicon cannot inject into a 64-bit JVM. There is an open function request for JRuby to send its 64-bit version with a 64-bit launcher. You must vote for this feature. I also heard that adoxa (Jason Hood) has a potential issue for this issue at work. Stay in touch.
Of course, the easiest solution at the moment is to ensure that JRuby uses a 32-bit JVM. Just change (or set) your JAVA_HOME environment variable to point to the 32-bit JVM and youre golden.
Update 2: issue resolved
The latest 64-bit binaries (ansi6432.zip) fixed the problem. Just download and extract them over version 1.51.

David Deutsch
source share