title: bash command preserve color when piping
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3515208/can-colorized-output-be-captured-via-shell-redirect">Can colorized output be captured via shell redirect?</a>  </p>
  </blockquote>
  
  
  
  <h2>setup</h2>
  
  <p>In this case specifically I'm trying to preserve the colors in <code>git status -s</code> when piping it to another command.</p>
  
  <p>Some git commands, <code>diff</code> for instance, and other commands like <code>grep</code> have an option <code>--color=always</code> but <code>git status</code> does not.</p>
  
  <h2>question</h2>
  
  <p>Is there a way to pipe or capture the output of a command and make it think it is outputting to the xterm shell so it doesn't automatically disable colors?</p>