Git config edit color with multiple styles

82 Views Asked by At

does any of you know if there a way to apply git color with both bold and underline (or as a more general question - apply color with multiple style args)?

I try to set git config color.grep.filename to be green, bold and underline... It seems as if I can't do it and must choose between bold and underline.

I tried the obvious way and got an error

git config color.grep.filename green bold ul

then I tried this way and only ul passed through

git config color.grep.filename green bold
git config color.grep.filename ul

then I tried hardcoded like this and only one of them worked

git config --add color.grep.filename "green ul bold"

and lastly I tried this way and got only bold green to work

git config --add color.grep.filename ul
git config --add color.grep.filename green bold

Is there something I am missing or is it just not a possibility to combine?

Thanks for the help :D

1

There are 1 best solutions below

5
On

Reading git config colors, I just tried:

git -c color.grep.filename="yellow ul bold" grep seec

It does work for yellow. Meaning I see a difference between "yellow ul" and "yellow ul bold".
But not for green or blue, in my Git for Windows session (CMD).
It might depend on your actual shell though.

  • yellow ul
    yellow ul

  • yellow ul bold or yellow bold ul
    yellow ul bold