From c71abe49a5a5cf0d6d066ddbce3da62e830360cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Thu, 20 Feb 2014 21:35:57 +0100 Subject: [PATCH] Fossil: use internal diff (fossil diff -i) Thanks to @sekiroh for the tip... --- liquidprompt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liquidprompt b/liquidprompt index f14d248..568576a 100755 --- a/liquidprompt +++ b/liquidprompt @@ -957,7 +957,7 @@ _lp_fossil_branch_color() local ret C2E=$(fossil changes | wc -l) C2A=$(fossil extras | wc -l) - ret=$(fossil diff -v | awk "/^(+[^+])|(+$)/ { plus+=1; } /^(-[^-])|(-$)/ { minus+=1; } END { total=\"\"; if(plus>0){ total=\"+\"plus; if(minus>0) total=total\"/\"; } if(minus>0) total=total\"-\"minus; print total;}") + ret=$(fossil diff -i -v | awk "/^(+[^+])|(+$)/ { plus+=1; } /^(-[^-])|(-$)/ { minus+=1; } END { total=\"\"; if(plus>0){ total=\"+\"plus; if(minus>0) total=total\"/\"; } if(minus>0) total=total\"-\"minus; print total;}") if (( C2E > 0 )); then [[ -n "$ret" ]] && ret+=" in "