diff options
author | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2013-08-14 11:22:51 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2013-08-14 11:22:51 +0200 |
commit | 534cbbfc09a6520adf32ea83edf3cce6583554da (patch) | |
tree | 544802fe50d28b91aae39f0213096faabe589a68 | |
parent | 338a732009d64d70ce5362fda3851208a9a65daf (diff) |
[Git] Cleanup git branch names
-rw-r--r-- | 01_Internal.zsh | 11 |
1 files changed, 10 insertions, 1 deletions
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 () { |