I want to use coloring in git output, e.g.:
git log --decorate --color
When I issue this command I get output looking like ESC[1;32m
where ESC
is in reversed color.
This looks to me as a valid escape sequence, except that the \033
must be sent and not the characters E
, S
and C
.
When I issue an ls
command, I get coloring of the files according to the rights.
So nothing wrong with the capabilities.
Is there an environment variable that must be set to the value of the ESC char?
Or am I looking in the wrong direction?
I am running openSUSE 11.1
Looks like your terminal (or any program handling the output) did not understand this, and showed ESC
as a placeholder for the \033
. If you are using less
to show the output, then it needs the -R
parameter.
I'm using the configuration core.pager=less -XRMSI
, and it works fine here (also an openSUSE, though I'm not sure which version). (Before changing, look up your current configuration with git config -l
, and remember the old value. Also you may want to read the less
documentation about the usable switches.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With