summaryrefslogtreecommitdiff
path: root/themes/michelebologna.zsh-theme
diff options
context:
space:
mode:
authorMichele Bologna <michele.bologna@gmail.com>2015-06-16 10:48:24 +0200
committerMichele Bologna <michele.bologna@gmail.com>2015-06-16 10:56:19 +0200
commit68b792bbb67958c726dd8ebe9cfe12f5e463d160 (patch)
treead7bf9ed0c0f1e8f19e6a29af951be49577186b6 /themes/michelebologna.zsh-theme
parentab18795f3cd9bd45aec60a4a4bd8ecf820eb86c4 (diff)
downloadzsh-68b792bbb67958c726dd8ebe9cfe12f5e463d160.tar.gz
zsh-68b792bbb67958c726dd8ebe9cfe12f5e463d160.tar.bz2
zsh-68b792bbb67958c726dd8ebe9cfe12f5e463d160.zip
Change to use omz git_prompt* functions
Removed references for official git __git_ps1() functions. Change to use omz function git_prompt* functions like: - git_prompt_info() -> branch name - git_prompt_status() -> check if untracked, modified, added, stashed file are in the current git repo - git_remote_status() -> check if current repo is ahead, behind, or diverged. These functions returns string automatically added to your PS1; these are customizable via exporting ZSH_THEME_GIT_PROMPT*
Diffstat (limited to 'themes/michelebologna.zsh-theme')
-rw-r--r--themes/michelebologna.zsh-theme15
1 files changed, 8 insertions, 7 deletions
diff --git a/themes/michelebologna.zsh-theme b/themes/michelebologna.zsh-theme
index fec243873..110e3f203 100644
--- a/themes/michelebologna.zsh-theme
+++ b/themes/michelebologna.zsh-theme
@@ -59,16 +59,17 @@ ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
-ZSH_THEME_GIT_PROMPT_UNTRACKED="%%"
-ZSH_THEME_GIT_PROMPT_MODIFIED="*"
-ZSH_THEME_GIT_PROMPT_ADDED="+"
-ZSH_THEME_GIT_PROMPT_STASHED="$"
-ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE="="
+ZSH_THEME_GIT_PROMPT_UNTRACKED="$blue%%"
+ZSH_THEME_GIT_PROMPT_MODIFIED="$red*"
+ZSH_THEME_GIT_PROMPT_ADDED="$green+"
+ZSH_THEME_GIT_PROMPT_STASHED="$blue$"
+ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE="$green="
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=">"
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="<"
-ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="<>"
+ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="$red<>"
PROMPT='$username_output$hostname_output:$current_dir_output%1(j. [$jobs_bg].)'
-PROMPT+='$(__git_ps1)'
+GIT_PROMPT='$(out=$(git_prompt_info)$(git_prompt_status)$(git_remote_status);if [[ -n $out ]]; then printf %s " $white($green$out$white)$reset";fi)'
+PROMPT+="$GIT_PROMPT"
PROMPT+=" $last_command_output%#$reset "
RPROMPT=''