appcelerator/titanium — pull request #167 by jhaynie (2014-11-16 07:19:43+00:00)
Title: allow the color coding to be controlled explicitly

# Summary of Change

allow the color coding to be controlled explicitly when passed in from command line even if tty is detached

this is needed for programs that want to pipe the titanium command (detached tty) but still want to pass through ansi color codes.

preserves the default behavior.

this change is needed for new unified CLI color coding. @cb1kenobi please review.

# Verification tests

Run the following from the console to test.

## Default attached TTY

```bash
ti
```
should have color coding

## Default detached TTY

```bash
ti | tee
```

should not have color coding

## Default explicit with attached TTY

```bash
ti --color true
```
should have color coding

## Default explicit with detached TTY

```bash
ti --color true | tee
```
should have color coding

## Default explicit with attached TTY

```bash
ti --color false
```
should not have color coding

## Default explicit with detached TTY

```bash
ti --color false | tee
```
should not have color coding

## Default with config merge with attached TTY

```bash
ti --config '{cli:{colors:true}}'
```
should have color coding

## Default with config merge with detached TTY

```bash
ti --config '{cli:{colors:true}}' | tee
```
since not explicit on command line, should not have color coding