From 4baf61e0eb647e4c82e9be194b95fc7730ddaa22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20P=C5=82azie=C5=84ski?= Date: Tue, 5 Apr 2016 20:05:49 +0200 Subject: [PATCH] moved maven coloring into separate command --- .zshrc | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/.zshrc b/.zshrc index c8035b4..82f9c25 100644 --- a/.zshrc +++ b/.zshrc @@ -440,31 +440,6 @@ alias su="sudo -u root -i" alias sudo="nocorrect sudo" #---------------------------------- Maven ------------------------------------ -# Coloring maven output -# based on https://gist.github.com/katta/1027800 - -mvn-color() -{ - mvn $@ 2>/dev/null | sed -e " - /^\W*$/d - s/\(-\{20,\}\)/$fg[black]\1$reset_color/g - s/Building \(.*\)/Building $fg_bold[magenta]\1$reset_color/g - s/--- \([^@]\+\) @ \(.*\) ---/$fg_bold[magenta]\2$reset_color - $fg_bold[cyan]\1$reset_color ---/g - s/\(\(BUILD \)\?SUCCESS\)/$fg_bold[green]\1$reset_color/g - s/\(\(BUILD \)\?FAILURE\)/$fg_bold[red]\1$reset_color/g - s/\(SKIPPED\)/$fg_bold[yellow]\1$reset_color/g - s/\(\[INFO\]\)\(.*\)/$fg_bold[blue]---$reset_color\2/g - s/\(\[WARNING\]\)\(.*\)/$fg_bold[yellow]>>>$reset_color\2/g - s/\(\[ERROR\]\)\(.*\)/$fg_bold[red]!!!$reset_color\2/g - s/^ T E S T S/$fg_bold[blue]~~~$reset_color / - s/Results :/$fg_bold[blue]~~~$reset_color Total: / - s/Running \([a-zA-Z0-9.]\+\)/$fg_bold[blue]~~~$reset_color Test: $fg_bold[cyan]\1$reset_color/ - s/Tests run: \([^,]*\), Failures: \([^,]*\), Errors: \([^,]*\), Skipped: \([^,]*\)/$fg_bold[blue]~~~$reset_color Run: $fg_bold[green]\1$reset_color, Failed: $fg_bold[red]\2$reset_color, Error: $fg_bold[red]\3$reset_color, Skipped: $fg_bold[yellow]\4$reset_color/ - " - echo -ne "$reset_color" -} -alias mvn='mvn-color' - # Read project information from current directory - needed for prompt maven_read_project() {