Ver Código Fonte

~/.zshrc: Report hg branch as "default" if no .hg/branch

Lu Stadler 7 anos atrás
pai
commit
ca33d94997
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      .zshrc

+ 1 - 1
.zshrc

@ -31,7 +31,7 @@ function repo_char {
31 31
32 32
function repo_branch {
33 33
	if $HOME/.bin/up .hg > /dev/null 2> /dev/null; then
34
		echo "%{$fg[green]%}$(cat `$HOME/.bin/up .hg`/.hg/branch)%{$reset_color%}"
34
		echo "%{$fg[green]%}$(cat `$HOME/.bin/up .hg`/.hg/branch 2> /dev/null || echo default)%{$reset_color%}"
35 35
	elif git branch > /dev/null 2> /dev/null; then
36 36
		echo "%{$fg[green]%}$(git branch --no-color | sed -En 's/^\* (.*)/\1/p')%{$reset_color%}"
37 37
	fi