From db3f42df5cc646e08420cd460844aac9350cc545 Mon Sep 17 00:00:00 2001 From: Thomas Cioppettini Date: Fri, 28 Dec 2012 00:04:35 -0500 Subject: [PATCH] Add zsh-theme with username path and clean/dirty git repo --- themes/ciop.zsh-theme | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 themes/ciop.zsh-theme diff --git a/themes/ciop.zsh-theme b/themes/ciop.zsh-theme new file mode 100644 index 000000000..80d34f20b --- /dev/null +++ b/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]"