1

I'm trying to store a=$(git status) to send it's content to a script and then print the result to the terminal. The problem is that the git colors are not gone. All the result is now without colors.

Any solution to this problem?

Celso Dantas
  • 1,181
  • 10
  • 14

1 Answers1

3

The following should do the trick.

a="$(git -c color.status=always status)"
echo "$a"
tbrk
  • 1,290
  • 1
  • 13
  • 20