Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adjust zsh promot

  • Loading branch information...
commit 2e0657826be2d51e95a739a77ed8b0d787e7ff9e 1 parent 6940e90
@megle authored
Showing with 5 additions and 5 deletions.
  1. +3 −3 zsh/git_prompt.zsh
  2. +2 −2 zshrc
View
6 zsh/git_prompt.zsh
@@ -1,7 +1,7 @@
# get the name of the branch we are on
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
- echo "$(parse_git_dirty)${ref#refs/heads/}"
+ echo " on $(parse_git_dirty)%{$fg[red]%}${ref#refs/heads/}%{$reset_color%}"
}
# checks if working tree is dirty
@@ -11,8 +11,8 @@ parse_git_dirty() {
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
fi
if [[ -n $(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null) ]]; then
- echo "%{$fg[red]%}"
+ echo "%{$fg[yellow]%}*"
else
- echo "%{$fg[blue]%}"
+ echo ""
fi
}
View
4 zshrc
@@ -12,8 +12,8 @@ export PATH=~/.dotfiles/bin:$PATH # put some helper scripts in the PATH
# set up my prompt
. ~/.dotfiles/zsh/git_prompt.zsh
-PROMPT='$(git_prompt_info)%{$fg[red]%} %(?,★,☆) %{$reset_color%}'
-RPROMPT='%{$fg[blue]%}%~%{$reset_color%}'
+PROMPT='%{$fg[red]%} %(?,★,☆) %{$reset_color%}'
+RPROMPT='%{$fg[blue]%}%~%{$reset_color%}$(git_prompt_info)'
# aliases
alias be='bundle exec'
Please sign in to comment.
Something went wrong with that request. Please try again.