felixonmars/ydcv — pull request #8 by stoolye (2013-01-03 08:33:27+00:00)
Title: Add option "--color" to control colorization & Fix UnicodeEncodeError in python2.

Now you can indicate WHEN ydcv colorize the output by setting --color=WHEN.
With --color=auto (default), just like `ls' or `grep', ydcv emits color code only when standard output is connected to a teriminal. So it avoids certain problems when its output is redirected or is fed to pipe as well as programs such as emacs.

This commit also fix a bug that redirect the ouput can cause a UnicodeEncodeError in python2 environment.