Re: Escape sequences instead of colors in terminal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Dec 5, 2012 6:11 PM, "Marcel Korpel" <marcel.lists@xxxxxxxxx> wrote:
>
> Hi all,
>
> I already asked this at the forums, but as no one has an answer there
> I hope someone here knows a solution. On a Git cheat sheet I found
> that I could add nice colors to Git's output, so I edited my
> ~/.gitconfig by adding:
>
> [color]
>     ui = auto
> [color "branch"]
>     current = yellow reverse
>     local = yellow
>     remote = green
> [color "diff"]
>     meta = yellow bold
>     frag = magenta bold
>     old = red bold
>     new = green bold
> [color "status"]
>     added = yellow
>     changed = green
>     untracked = cyan
>
> When performing a git log my terminal looks like this:
> http://ompldr.org/vZ2t1bA (escape sequences instead of colors). The
> same problem appears with git diff: http://ompldr.org/vZ2t1bg
>
> However, as you can see in the second screenshot, git status and git
> branch look correct. This happens in urxvt, but also in xterm and the
> terminal screens (tty[1-6]).
>
> Do you know what's wrong?
>
> Regards, Marcel

Your pager is to blame. Assuming you're using less, you need to pass the -R
option. You can add:

export LESS=-R

To your shell rc file.


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux