Thread (4 messages) flat view 4 messages, 4 authors, 2016-06-15

Re: -p diff output and the 'Index:' line

From: Thomas Glanzmann <hidden>
Date: 2016-06-15 22:41:58

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help