Display unix color in cmd windows (for example, ← [31m)

I recently started making rails-based rubies in Windows 7 and found several color codes for commands (rspec, guard, etc.) that just appear in the text on the Windows command line (or through Console2, which I use). eg:

←[31mrspec ./spec/views/users/index.html.erb_spec.rb:21←[0m ←[36m# users/index renders a list of users←[0m ←[31mrspec ./spec/requests/homes_spec.rb:9←[0m ←[36m# Homes GET /homes ←[0m ←[31mrspec ./spec/views/users/new.html.erb_spec.rb:13←[0m ←[36m# users/new renders new user form←[0m ←[31mrspec ./spec/views/users/show.html.erb_spec.rb:13←[0m ←[36m# users/show renders attributes in <p>←[0m 

I know that you can disable the color for most tools by pulling the --color command from the configuration files (for example, a .respc file), but it is a pain to do this for everything and color coding would be nice.

Any ideas how I can display them correctly on Windows?

+8
windows cmd ruby-on-rails rspec conemu
source share
2 answers
  • Change Console2 to ConEmu (I am the author of this console). It supports Ansi x3.64

  • Or you can use AnsiCon to enable Ansi

+12
source share

I am using Console2 ( http://sourceforge.net/projects/console/ ) using ansicon ( https://github.com/adoxa/ansicon ) and it works well:

  • compile or download the dll from the author: http://ansicon.adoxa.cjb.net/ and put it in the repertoire included in your path;
  • In the console, run ansicon: ansicon -i
+2
source share

All Articles