ohmyzsh/themes/strug.zsh-theme
leif.hanack 8919463329 Added a possibility to display the remote branch and the number of commits you are ahead or behind.
The theme "strug" demonstrates this new funtionality. There are some new variables:

ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED : allows you to switch between the current and the new display option.
ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX : prefix for the remote status information
ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX : suffix for the remote status information
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR : color for displaying the ahead information (currently only used for the detailed mode)
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR : color for displaying the behind information (currently only used for the detailed mode)
2013-01-03 23:10:19 +01:00

25 lines
918 B
Bash

# terminal coloring
export CLICOLOR=1
export LSCOLORS=dxFxCxDxBxegedabagacad
local git_branch='$(git_prompt_info)%{$reset_color%}$(git_remote_status)'
PROMPT="%{$fg[green]%}╭─%n@%m %{$reset_color%}%{$fg[yellow]%}in %~ %{$reset_color%}${git_branch}
%{$fg[green]%}╰\$ %{$reset_color%}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}on "
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%}%{$fg[red]%} ✘ %{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ✔ %{$reset_color%}"
ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED=true
ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX="%{$fg[yellow]%}("
ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX="%{$fg[yellow]%})%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=" +"
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR=%{$fg[green]%}
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE=" -"
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR=%{$fg[red]%}