From: Thomas Glanzmann Date: Sun, 29 May 2005 12:36:24 GMT Subject: Re: -p diff output and the 'Index:' line Message-ID: <20050529123624.GJ4881@cip.informatik.uni-erlangen.de> In-Reply-To: <2788.10.10.10.24.1117353158.squirrel@linux1> Hello, I actually use the following bash script to browse the diffs with what-changed: (faui03) [~/work/monitor] git-whatchanged -p | cdiff ... # COLORDEFINITIONS BLACK="" RED="" GREEN="" YELLO="" BLUE="" PURPLE="" CYAN="" WHITE="" END="" REVERSE="" cdiff() { cat $1 | \ sed -e " \ s/^\(diff-tree\)\(.*\)/\1${RED}\2${END}/; \ s/^+.*/$RED&$END/; \ s/^-.*/$BLUE&$END/; \ s/^@.*/$GREEN&$END/; \ s/^Date.*/$RED&$END/; \ s/^Author.*/$RED&$END/; \ " | less -R -i -p "^diff-tree" # This would highlight manpages but the last line clashes with cdiff # --tg 00:52 05-05-26 #s/^[A-Z]\+[A-Z ]\+$/$RED&$END/; \ #s/[A-Z]\+([0-9])/$RED&$END/g; \ # s/\W--\?[0-9a-zA-Z=-]\+/$BLUE&$END/g; \ } Gruesse, Thomas