I have this extremely simple powershell script that adds each line to a number.
function number
{
$i = 0;
foreach($line in $input)
{
[string]$i + ":" + $line
++$i
}
}
I would like this function to preserve input colors. For example, if I execute the following command, colors are lost:
git status -s | number
While doing
git status -s
Gives me beautiful products. What can I change in my powershell function to accomplish this.
Note. I already tried telling git to always output colors with information in the answers to this question , so I think my side is that ignores the colors.
This is not a duplicate of a question that was previously marked as a duplicate .
, , MSBuild , . , , . ( HTML) , , .