highlighting (git) patches in mutt

April 23, 2009, by Antonio Terceiro - No comments yet

This tip is useful for those who want to read the patches before even trying them into a branch. While it's possible to read them as regular text, being able to spot directly what matters helps doing it very quicker. Drop the following lines in your ~/.muttrc to highlight the relevant elements in the diff:

 

color body brightred default "^-.*"
color body brightgreen default "^[+].*"
color body brightwhite default "^diff --git.*"
color body brightwhite default "^index [a-f0-9].*"
color body brightyellow default "^@@.*"

Of course you can change the colors to match your preferences, I'm not even sure yet that these are the best colors for me. The result looks like this:

Highlighted patch in mutt



estacionamento

April 2, 2009, by Antonio Terceiro - No comments yet

Levante a mão quem já não teve vontade de poder fazer isso. smile

Cortesia do xkcd.