From 4c1fde46237f3b9a662ce17049a5cde30cf37b95 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 22 Mar 2012 11:45:55 -0400 Subject: [PATCH] update grep/scrub_patch --- .profile.d/aliases.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.profile.d/aliases.sh b/.profile.d/aliases.sh index 2b6f317..98bf762 100644 --- a/.profile.d/aliases.sh +++ b/.profile.d/aliases.sh @@ -32,17 +32,17 @@ alias xine='xine -l' alias wol-vapier='wakeonlan -i 192.168.1.255 00:25:22:64:19:79; wakeonlan -i 192.168.0.255 00:25:22:64:19:79' if [[ ${TERM} != "dumb" ]] ; then - alias grep='grep --colour=auto' + alias grep='grep --colour=auto -d skip' alias ls='ls --color=auto' fi grep-svn() { find '(' -wholename '*/.svn' -prune -o -type f -print0 ')' | xargs -0 grep "$@" ; } scrub_patch() { - sed -i \ - -e '/^index /d' \ + sed -i \ + -e '/^index /d' \ -e '/^new file mode /d' \ - -e '/^Index:/d' \ + -e '/^Index:/d' \ -e '/^=========/d' \ -e '/^RCS file:/d' \ -e '/^retrieving/d' \ @@ -50,9 +50,10 @@ scrub_patch() { -e '/^Files .* differ$/d' \ -e '/^Only in /d' \ -e '/^Common subdirectories/d' \ - -e '/^+++/s:\t.*::' \ - -e '/^---/s:\t.*::' \ - "$@" + -e '/^deleted file mode [0-9]*$/d' \ + -e '/^+++/s:\t.*::' \ + -e '/^---/s:\t.*::' \ + "$@" } scrub_html() { -- 2.39.5