ruby / ruby/rdoc

Broken ANSI color sequences on Windows

Open
#336 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Windows
Dominant language
Ruby
Stars
930
Forks
465
Avg merge
3d 10h
Merged PRs (30d)
27

Description

Not sure if this bug fits here. I'm using RubyInstaller Ruby 2.0.0-p451 (x64) with DevKit 4.7.2 (x64) on Windows7.

After installing the rdoc-data gem and installing the ri data for core + stdlib, i.e.

gem install rdoc-data
rdoc-data --install

...I noticed that the ansi formatter is now turned on by default. Not sure how that happened, but thankfully to @ssmythe I found this workaround which suggests set RI=--format bs to restore the old behaviour.

In fact the ansi coloring would be nice, but it doesn't work properly with my setup, i.e. looks like this:
image

Any ideas what could be the cause or how to fix this?

/cc @luislavena @ssmythe

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with RubyInstaller on Windows 7 after running gem install rdoc-data and rdoc-data --install, then compare the ANSI formatter output with the RI=--format bs workaround. Trace the RI formatter entry point used by these commands and verify that colored output renders correctly on Windows without requiring the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.