From 534cbbfc09a6520adf32ea83edf3cce6583554da Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Wed, 14 Aug 2013 11:22:51 +0200 Subject: [Git] Cleanup git branch names --- 01_Internal.zsh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/01_Internal.zsh b/01_Internal.zsh index c0604af..2b404c6 100644 --- a/01_Internal.zsh +++ b/01_Internal.zsh @@ -134,7 +134,16 @@ __get_hg_branch () fi } -__cleanup_git_branch_name() { sed 's,^tags/,,;s,^remotes/,,;s,\^0$,,' } +__cleanup_git_branch_name() { sed ' + s,^tags/\(.*\),[\1], + /^remotes/ { + s,^remotes/,, + s,^devel/,~, + s,^origin/,, + s,^,%{\\033['$color[standout]'m%}, + } + s,\^0$,, + ' } __get_git_fullstatus () { -- cgit v1.2.3