]> git.wh0rd.org - home.git/commitdiff
update grep/scrub_patch
authorMike Frysinger <vapier@gentoo.org>
Thu, 22 Mar 2012 15:45:55 +0000 (11:45 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 28 Apr 2012 19:36:45 +0000 (15:36 -0400)
.profile.d/aliases.sh

index 2b6f317f414b9de23c0bc7f24b05060819363d40..98bf762f8b749976b9e2f57ca9a9ee01a8a51c1e 100644 (file)
@@ -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() {