leahneukirchen / mblaze

Unix utilities to deal with Maildir
Other
447 stars 48 forks source link

mcolor: Add coloring support for diffs #249

Closed thyssentishman closed 1 year ago

thyssentishman commented 1 year ago

Add coloring for diffs sent as part of the email body. This adds support for the following three ENV variables:

Since the default theme is quite bright, these default to bright colors as well (Green1, Red1 and Yellow1 from the 256 XTerm colors respectively).

leahneukirchen commented 1 year ago

Almost out of scope for mcolor, but it's a cute feature.

I think there are other ways to end a unified diff, probably any line not leading with space, -, + should be regarded as end of diff?

leahneukirchen commented 1 year ago

hm, but git has the index lines...

leahneukirchen commented 1 year ago

I guess resetting diff on empty lines is good enough!

thyssentishman commented 1 year ago

Almost out of scope for mcolor, but it's a cute feature.

Glad you like it :)

I guess resetting diff on empty lines is good enough!

Updated, thanks!

leahneukirchen commented 1 year ago

I think less bright is better tho, make it 160 and 40.

thyssentishman commented 1 year ago

I think less bright is better tho, make it 160 and 40.

Yeah that seems better. Updated.

thyssentishman commented 1 year ago

Thanks :)