You are not logged in.

#1 2022-07-08 00:47:28

dawnofman
Member
Registered: 2019-07-26
Posts: 140

diff color palette: missing ID for diff lines ?

The man page for diff mentions --color alongside --palette and states to go looking for info diff for more details on the palette sequence string.

The default --palette is ´rs=0:hd=1:ad=32:de=31:ln=36' which should be the same as ´rs=0;0:hd=0;1:ad=0;32:de=0;31:ln=0;36' ... meaning:

- ad=0;32 for dark green added lines
- de=0;31 for dark red deleted lines
- ln=0;36 for default bold foreground line numbers (for stand-alone diff mode only -not for --side-by-side)

But there is no mention to diff lines and I hardly doubt that someone coded for added/removed lines and not for diff lines. Anyone knows better ?

PS1: I've been using diff piped to colordiff for many years now and, today, but sheer accident, I found that diff supports --color and --palette which probably have not worked as expected back then when I installed colordiff, who knows, I don't remember. The fact is that I want to get rid of colordiff now if I can also change the color for diff lines since I use a lot the --side-by-side switch with yellow for mismatching lines.

PS2: colordiffrc has all the IDs for added/removed/diffs/etc.

Offline

#2 2022-07-08 00:53:44

dawnofman
Member
Registered: 2019-07-26
Posts: 140

Re: diff color palette: missing ID for diff lines ?

dawnofman wrote:

But there is no mention to diff lines and I hardly doubt that someone coded for added/removed lines and not for diff lines. Anyone knows better ?

rs ?

Offline

#3 2022-07-08 01:14:37

loqs
Member
Registered: 2014-03-06
Posts: 18,967

Re: diff color palette: missing ID for diff lines ?

Offline

#4 2022-07-08 01:27:50

dawnofman
Member
Registered: 2019-07-26
Posts: 140

Re: diff color palette: missing ID for diff lines ?

Thanks for the link to the source code loqs smile

Nope, I was wrong, rs=0 is to reset to the default color upon exit.

So no, there is no placeholder for non-matching lines sad

Offline

Board footer

Powered by FluxBB