Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deactivation switch for ANSI color #1

Open
trans opened this issue Dec 27, 2010 · 3 comments
Open

Deactivation switch for ANSI color #1

trans opened this issue Dec 27, 2010 · 3 comments
Labels

Comments

@trans
Copy link
Member

trans commented Dec 27, 2010

There needs to be a way to globally deactivate ANSI coloring.

@trans
Copy link
Member Author

trans commented May 7, 2011

Should this effect all codes including moving the cursor, or just effect colorization codes?

@trans
Copy link
Member Author

trans commented Nov 10, 2011

This has been implemented with $ansi global variable. It will work in almost all cases. But there are still a few edge cases that will need address in the future, and also it doesn't effect BBCode yet b/c that lib still needs to be fully integrated with ANSI::Code.

@trans
Copy link
Member Author

trans commented Jan 6, 2015

It has been pointed out to me that it would probably be better if a global wasn't set by default. For that to work there are two options.

  1. Either $ansi = nil would have to be equivalent to $ansi = true and only setting it specifically to false would deactivate it. That'll work but it is a bit odd to have nil === true.
  2. Or we need to use a $noansi (or $no_ansi) global instead.

Both cases may cause backward compatibility issues --the later more so than the former. So does the benefit out way the downside of change?

@trans trans added the Consider label Jan 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant