Skip to content

Commit

Permalink
Add zsh-theme with username path and clean/dirty git repo
Browse files Browse the repository at this point in the history
  • Loading branch information
tomciopp committed Dec 28, 2012
1 parent 397c085 commit db3f42d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions themes/ciop.zsh-theme
@@ -0,0 +1,16 @@
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
}

function get_pwd() {
print -D $PWD
}

PROMPT=$'%{$fg[cyan]%}%m $fg[yellow]$(get_pwd) $(git_prompt_info)\
%{$fg[red]%}➜ %{$reset_color%} '

ZSH_THEME_GIT_PROMPT_PREFIX="[git:"
ZSH_THEME_GIT_PROMPT_SUFFIX="]$reset_color"
ZSH_THEME_GIT_PROMPT_DIRTY="$fg[red]+"
ZSH_THEME_GIT_PROMPT_CLEAN="$fg[green]"

0 comments on commit db3f42d

Please sign in to comment.