'use strict';
module.exports = (function () {
	var term;

	if (process.argv.indexOf('--no-color') !== -1) {
		return false;
	}

	if (process.argv.indexOf('--color') !== -1) {
		return true;
	}

	if (!process.stdout.isTTY) {
		return false;
	}

	if (process.platform === 'win32') {
		return true;
	}

	if ('COLORTERM' in process.env) {
		return true;
	}

	term = process.env.TERM;

	if (!term) {
		return false;
	}

	term = term.toLowerCase();

	return term.indexOf('color') !== -1 || term === 'xterm' || term === 'linux';
})();

@@ -43,20 +43,8 @@
 ) %7B%0A
-%09var term;%0A%0A
 %09if 
@@ -340,173 +340,67 @@
 %7D%0A%0A%09
-term = process.env.TERM;%0A%0A%09if (!term) %7B%0A%09%09return false;%0A%09%7D%0A%0A%09term = term.toLowerCase();%0A%0A%09return term.indexOf('color') !== -1 %7C%7C term === 'xterm' %7C%7C term === 'linux'
+return /%5Escreen%7C%5Exterm%7Ccolor%7Clinux/i.test(process.env.TERM)
 ;%0A%7D)

improve color detection. fixes #1