1
0
Fork 0

Change all the themes to use the new git plugin and rm the old git plugin code.

pull/2/head
Ashley Dev 14 years ago
parent c661eedfb1
commit 723c2c43c8

@ -1,79 +0,0 @@
# Renders the name of the current branch.
function git_prompt_info() {
local branch=$(git_current_branch)
if [[ -n "$branch" ]]; then
echo "${ZSH_THEME_GIT_PROMPT_PREFIX}${branch}$(parse_git_dirty)${ZSH_THEME_GIT_PROMPT_SUFFIX}"
fi
}
# Gets the current branch.
function git_current_branch() {
local ref=$(git symbolic-ref HEAD 2> /dev/null)
if [[ -n "$ref" ]]; then
echo "${ref#refs/heads/}"
fi
}
# Checks if the working tree is dirty.
function parse_git_dirty() {
if [[ -n $(git status -s 2> /dev/null) ]]; then
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
else
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
fi
}
# Checks if there are commits ahead from remote.
function git_prompt_ahead() {
if $(echo "$(git log origin/$(git_current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
fi
}
# Formats the prompt string for current git commit short SHA.
function git_prompt_short_sha() {
local sha=$(git rev-parse --short HEAD 2> /dev/null)
if [[ -n "$sha" ]]; then
echo "${ZSH_THEME_GIT_PROMPT_SHA_BEFORE}${sha}${ZSH_THEME_GIT_PROMPT_SHA_AFTER}"
fi
}
# Formats the prompt string for current git commit long SHA.
function git_prompt_long_sha() {
local sha=$(git rev-parse HEAD 2> /dev/null)
if [[ -n "$sha" ]]; then
echo "${ZSH_THEME_GIT_PROMPT_SHA_BEFORE}${sha}${ZSH_THEME_GIT_PROMPT_SHA_AFTER}"
fi
}
# Gets the status of the working tree.
function git_prompt_status() {
local indicators line untracked added modified renamed deleted
while IFS=$'\n' read line; do
if [[ "$line" =~ '^\?\? ' ]]; then
[[ -n $untracked ]] && continue || untracked='yes'
indicators="${ZSH_THEME_GIT_PROMPT_UNTRACKED}${indicators}"
fi
if [[ "$line" =~ '^(((A|M|D|T) )|(AD|AM|AT|MM)) ' ]]; then
[[ -n $added ]] && continue || added='yes'
indicators="${ZSH_THEME_GIT_PROMPT_ADDED}${indicators}"
fi
if [[ "$line" =~ '^(( (M|T))|(AM|AT|MM)) ' ]]; then
[[ -n $modified ]] && continue || modified='yes'
indicators="${ZSH_THEME_GIT_PROMPT_MODIFIED}${indicators}"
fi
if [[ "$line" =~ '^R ' ]]; then
[[ -n $renamed ]] && continue || renamed='yes'
indicators="${ZSH_THEME_GIT_PROMPT_RENAMED}${indicators}"
fi
if [[ "$line" =~ '^( D|AD) ' ]]; then
[[ -n $deleted ]] && continue || deleted='yes'
indicators="${ZSH_THEME_GIT_PROMPT_DELETED}${indicators}"
fi
if [[ "$line" =~ '^UU ' ]]; then
[[ -n $unmerged ]] && continue || unmerged='yes'
indicators="${ZSH_THEME_GIT_PROMPT_UNMERGED}${indicators}"
fi
done < <(git status --porcelain 2> /dev/null)
echo $indicators
}

@ -1,3 +1,2 @@
source $ZSH/plugins/git/git-aliases.plugin.zsh source $ZSH/plugins/git/git-aliases.plugin.zsh
source $ZSH/plugins/git/git-prompt-old.plugin.zsh
source $ZSH/plugins/git/git-prompt.plugin.zsh source $ZSH/plugins/git/git-prompt.plugin.zsh

@ -1,14 +1,30 @@
PROMPT='%{$fg[blue]%}%n%{$reset_color%} on %{$fg[red]%}%M%{$reset_color%} in %{$fg[blue]%}%~%b%{$reset_color%}$(git_time_since_commit)$(check_git_prompt_info) local R="%{$terminfo[sgr0]%}"
PROMPT='%{$fg[blue]%}%n$R on %{$fg[red]%}%M$R in %{$fg[blue]%}%~%b$R$GIT_PROMPT_INFO
$ ' $ '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}" git_prompt_info ()
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})" {
if [ -z "$(git_prompt__git_dir)" ]; then
GIT_PROMPT_INFO="($(rvm_gemset)$R)"
return
fi
local prompt=''
git_prompt__branch
prompt="%{$fg[white]%}$GIT_PROMPT_BRANCH"
# Text to display if the branch is dirty git_prompt__rebase_info
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" prompt="${prompt}$GIT_PROMPT_REBASE_INFO"
# Text to display if the branch is clean git_prompt__dirty_state
ZSH_THEME_GIT_PROMPT_CLEAN="" if [[ "$GIT_PROMPT_DIRTY_STATE_ANY_DIRTY" = 'yes' ]]; then
prompt="${prompt}%{$fg[red]%}*"
fi
GIT_PROMPT_INFO="($(rvm_gemset)$(git_time_since_commit)$prompt$R)"
}
# Colors vary depending on time lapsed. # Colors vary depending on time lapsed.
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}" ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}"
@ -17,24 +33,11 @@ ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG="%{$fg[red]%}"
ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[cyan]%}" ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[cyan]%}"
# Git sometimes goes into a detached head state. git_prompt_info doesn't
# return anything in this case. So wrap it in another function and check
# for an empty string.
function check_git_prompt_info() {
if git rev-parse --git-dir > /dev/null 2>&1; then
if [[ -z $(git_prompt_info) ]]; then
echo "%{$fg[magenta]%}detached-head%{$reset_color%})"
else
echo "$(git_prompt_info)"
fi
fi
}
# Determine if we are using a gemset. # Determine if we are using a gemset.
function rvm_gemset() { function rvm_gemset() {
GEMSET=`rvm gemset list | grep '=>' | cut -b4-` GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
if [[ -n $GEMSET ]]; then if [[ -n $GEMSET ]]; then
echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|" echo "%{$fg[yellow]%}${GEMSET}$R|"
fi fi
} }
@ -72,15 +75,15 @@ function git_time_since_commit() {
fi fi
if [ "$HOURS" -gt 24 ]; then if [ "$HOURS" -gt 24 ]; then
echo "($(rvm_gemset)$COLOR${DAYS}d${SUB_HOURS}h${SUB_MINUTES}m%{$reset_color%}|" echo "$COLOR${DAYS}d${SUB_HOURS}h${SUB_MINUTES}m$R|"
elif [ "$MINUTES" -gt 60 ]; then elif [ "$MINUTES" -gt 60 ]; then
echo "($(rvm_gemset)$COLOR${HOURS}h${SUB_MINUTES}m%{$reset_color%}|" echo "$COLOR${HOURS}h${SUB_MINUTES}m$R|"
else else
echo "($(rvm_gemset)$COLOR${MINUTES}m%{$reset_color%}|" echo "$COLOR${MINUTES}m$R|"
fi fi
else else
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL" COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
echo "($(rvm_gemset)$COLOR~|" echo "$COLOR~|"
fi fi
fi fi
} }

@ -2,7 +2,7 @@ if [ $UID -eq 0 ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} ' PROMPT='%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $GIT_PROMPT_INFO%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} '
RPS1="${return_code}" RPS1="${return_code}"

@ -1,7 +1,7 @@
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="yellow"; fi if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="yellow"; fi
PROMPT='%{$fg[$NCOLOR]%}%c ➤ %{$reset_color%}' PROMPT='%{$fg[$NCOLOR]%}%c ➤ %{$reset_color%}'
RPROMPT='%{$fg[$NCOLOR]%}%p $(git_prompt_info)%{$reset_color%}' RPROMPT='%{$fg[$NCOLOR]%}%p $GIT_PROMPT_INFO%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:" ZSH_THEME_GIT_PROMPT_PREFIX="git:"
ZSH_THEME_GIT_PROMPT_SUFFIX="" ZSH_THEME_GIT_PROMPT_SUFFIX=""

@ -1,5 +1,5 @@
PROMPT='$fg_bold[blue][ $fg[red]%t $fg_bold[blue]] $fg_bold[blue] [ $fg[red]%n@%m:%~$(git_prompt_info)$fg[yellow]$(rvm_prompt_info)$fg_bold[blue] ]$reset_color PROMPT='$fg_bold[blue][ $fg[red]%t $fg_bold[blue]] $fg_bold[blue] [ $fg[red]%n@%m:%~$GIT_PROMPT_INFO$fg[yellow]$(rvm_prompt_info)$fg_bold[blue] ]$reset_color
$ ' $ '
# git theming # git theming
ZSH_THEME_GIT_PROMPT_PREFIX="$fg_bold[green](" ZSH_THEME_GIT_PROMPT_PREFIX="$fg_bold[green]("

@ -1,6 +1,6 @@
# the svn plugin has to be activated for this to work. # the svn plugin has to be activated for this to work.
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}$(svn_prompt_info)%{$reset_color%}' PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$GIT_PROMPT_INFO%{$fg_bold[blue]%}$(svn_prompt_info)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"

@ -4,7 +4,7 @@ local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}' local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}' local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}'
local rvm_ruby='%{$fg[red]%}$(rvm-prompt i v g)%{$reset_color%}' local rvm_ruby='%{$fg[red]%}$(rvm-prompt i v g)%{$reset_color%}'
local git_branch='$(git_prompt_info)%{$reset_color%}' local git_branch='$GIT_PROMPT_INFO%{$reset_color%}'
PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch} PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch}
╰─%B$%b " ╰─%B$%b "

@ -1,4 +1,4 @@
PROMPT=$'%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%I:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\ PROMPT=$'%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%I:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $GIT_PROMPT_INFO\
%{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} ' %{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["

@ -1,6 +1,6 @@
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="white"; fi if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="white"; fi
PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $GIT_PROMPT_INFO%(!.#.$) '
RPROMPT='[%*]' RPROMPT='[%*]'
# git theming # git theming

@ -1,4 +1,4 @@
PROMPT='%{$fg_bold[cyan]%}☁ %{$fg_bold[green]%}%p %{$fg[green]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' PROMPT='%{$fg_bold[cyan]%}☁ %{$fg_bold[green]%}%p %{$fg[green]%}%c %{$fg_bold[cyan]%}$GIT_PROMPT_INFO%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"

@ -8,7 +8,7 @@ DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(~/.rvm/bin/rvm-prompt i
DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}" DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}"
# Grab the current filepath, use shortcuts: ~/Desktop # Grab the current filepath, use shortcuts: ~/Desktop
# Append the current git branch, if in a git repository: ~aw@master # Append the current git branch, if in a git repository: ~aw@master
DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~\$(git_prompt_info)%{$reset_color%}" DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~\$GIT_PROMPT_INFO%{$reset_color%}"
# Grab the current username: dallas # Grab the current username: dallas
DALLAS_CURRENT_USER_="%{$fg[red]%}%n%{$reset_color%}" DALLAS_CURRENT_USER_="%{$fg[red]%}%n%{$reset_color%}"
# Use a % for normal users and a # for privelaged (root) users. # Use a % for normal users and a # for privelaged (root) users.

@ -1,6 +1,6 @@
# meh. Dark Blood Rewind, a new beginning. # meh. Dark Blood Rewind, a new beginning.
PROMPT=$'%{$fg[red]%}┌[%{$fg_bold[white]%}%n%{$reset_color%}%{$fg[red]%}@%{$fg_bold[white]%}%m%{$reset_color%}%{$fg[red]%}] [%{$fg_bold[white]%}/dev/%y%{$reset_color%}%{$fg[red]%}] %{$(git_prompt_info)%}%(?,,%{$fg[red]%}[%{$fg_bold[white]%}%?%{$reset_color%}%{$fg[red]%}]) PROMPT=$'%{$fg[red]%}┌[%{$fg_bold[white]%}%n%{$reset_color%}%{$fg[red]%}@%{$fg_bold[white]%}%m%{$reset_color%}%{$fg[red]%}] [%{$fg_bold[white]%}/dev/%y%{$reset_color%}%{$fg[red]%}] %{$GIT_PROMPT_INFO%}%(?,,%{$fg[red]%}[%{$fg_bold[white]%}%?%{$reset_color%}%{$fg[red]%}])
%{$fg[red]%}└[%{$fg_bold[white]%}%~%{$reset_color%}%{$fg[red]%}]>%{$reset_color%} ' %{$fg[red]%}└[%{$fg_bold[white]%}%~%{$reset_color%}%{$fg[red]%}]>%{$reset_color%} '
PS2=$' %{$fg[red]%}|>%{$reset_color%} ' PS2=$' %{$fg[red]%}|>%{$reset_color%} '

@ -1,7 +1,7 @@
# Copied and modified from the oh-my-zsh theme from geoffgarside # Copied and modified from the oh-my-zsh theme from geoffgarside
# Red server name, green cwd, blue git status # Red server name, green cwd, blue git status
PROMPT='%{$fg[red]%}%m%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) ' PROMPT='%{$fg[red]%}%m%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$GIT_PROMPT_INFO %(!.#.$) '
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}(" ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}("
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"

@ -26,7 +26,7 @@ local host="@${host_repr[$(hostname)]:-$(hostname)}%{$reset_color%}"
# Compacted $PWD # Compacted $PWD
local pwd="%{$fg[blue]%}%c%{$reset_color%}" local pwd="%{$fg[blue]%}%c%{$reset_color%}"
PROMPT='${time} ${user}${host} ${pwd} $(git_prompt_info)' PROMPT='${time} ${user}${host} ${pwd} $GIT_PROMPT_INFO'
# i would prefer 1 icon that shows the "most drastic" deviation from HEAD, # i would prefer 1 icon that shows the "most drastic" deviation from HEAD,
# but lets see how this works out # but lets see how this works out

@ -6,30 +6,70 @@
# SCREENSHOT: coming soon # SCREENSHOT: coming soon
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
MODE_INDICATOR="%{$fg_bold[red]%}%{$reset_color%}%{$fg[red]%}%{$reset_color%}" local R="%{$terminfo[sgr0]%}"
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
PROMPT='%{$fg[blue]%}%m%{$reset_color%}%{$fg_bold[white]%} ओम् %{$reset_color%}%{$fg[cyan]%}%~:%{$reset_color%}$(git_time_since_commit)$(git_prompt_info) MODE_INDICATOR="%{$fg_bold[red]%}$R%{$fg[red]%}$R"
%{$fg[red]%}%!%{$reset_color%} $(prompt_char) ' local return_status="%{$fg[red]%}%(?..⏎)$R"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}git%{$reset_color%}@%{$bg[white]%}%{$fg[black]%}" PROMPT='%{$fg[blue]%}%m$R%{$fg_bold[white]%} ओम् $R%{$fg[cyan]%}%~:$R$GIT_PROMPT_INFO
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})" %{$fg[red]%}%!$R $(prompt_char) '
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
RPROMPT='${return_status}$(git_prompt_status)%{$reset_color%}' git_prompt_info ()
{
if [ -z "$(git_prompt__git_dir)" ]; then
GIT_PROMPT_INFO=''
GIT_RPROMPT_INFO=''
return
fi
local prompt=''
git_prompt__branch
prompt="%{$fg_bold[green]%}git$R@%{$bg[white]%}%{$fg[black]%}$GIT_PROMPT_BRANCH"
git_prompt__rebase_info
prompt="${prompt}$GIT_PROMPT_REBASE_INFO"
git_prompt__dirty_state
if [[ "$GIT_PROMPT_DIRTY_STATE_ANY_DIRTY" = 'yes' ]]; then
prompt="${prompt}%{$fg[red]%}!"
fi
GIT_PROMPT_INFO="($(git_time_since_commit)$prompt$R)"
local rprompt=''
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_ADDED" = 'yes' ]]; then
rprompt="%{$fg[green]%} ✚"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_MODIFIED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[blue]%} ✹"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_MODIFIED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[blue]%} ✹"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_DELETED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[red]%} ✖"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_DELETED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[red]%} ✖"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_RENAMED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[magenta]%} ➜"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_UNMERGED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[yellow]%} ═"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_UNTRACKED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[cyan]%} ✭"
fi
GIT_RPROMPT_INFO=$rprompt
}
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚" RPROMPT='${return_status}$GIT_RPROMPT_INFO$R'
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
function prompt_char() { function prompt_char() {
git branch >/dev/null 2>/dev/null && echo "%{$fg[green]%}±%{$reset_color%}" && return git branch >/dev/null 2>/dev/null && echo "%{$fg[green]%}±$R" && return
hg root >/dev/null 2>/dev/null && echo "%{$fg_bold[red]%}☿%{$reset_color%}" && return hg root >/dev/null 2>/dev/null && echo "%{$fg_bold[red]%}☿$R" && return
echo "%{$fg[cyan]%}◯ %{$reset_color%}" echo "%{$fg[cyan]%}◯ $R"
} }
# Colors vary depending on time lapsed. # Colors vary depending on time lapsed.
@ -40,7 +80,8 @@ ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[cyan]%}"
# Determine the time since last commit. If branch is clean, # Determine the time since last commit. If branch is clean,
# use a neutral color, otherwise colors will vary according to time. # use a neutral color, otherwise colors will vary according to time.
function git_time_since_commit() { git_time_since_commit ()
{
if git rev-parse --git-dir > /dev/null 2>&1; then if git rev-parse --git-dir > /dev/null 2>&1; then
# Only proceed if there is actually a commit. # Only proceed if there is actually a commit.
if [[ $(git log 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; then if [[ $(git log 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; then
@ -71,15 +112,15 @@ function git_time_since_commit() {
fi fi
if [ "$HOURS" -gt 24 ]; then if [ "$HOURS" -gt 24 ]; then
echo "($COLOR${DAYS}d${SUB_HOURS}h${SUB_MINUTES}m%{$reset_color%}|" echo "$COLOR${DAYS}d${SUB_HOURS}h${SUB_MINUTES}m$R|"
elif [ "$MINUTES" -gt 60 ]; then elif [ "$MINUTES" -gt 60 ]; then
echo "($COLOR${HOURS}h${SUB_MINUTES}m%{$reset_color%}|" echo "$COLOR${HOURS}h${SUB_MINUTES}m$R|"
else else
echo "($COLOR${MINUTES}m%{$reset_color%}|" echo "$COLOR${MINUTES}m$R|"
fi fi
else else
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL" COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL"
echo "($COLOR~|" echo "$COLOR~|"
fi fi
fi fi
} }

@ -10,7 +10,7 @@ function prompt_char {
PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%} PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%}
) )
%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info) %{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$GIT_PROMPT_INFO
%_ $(prompt_char) ' %_ $(prompt_char) '
RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}' RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'

@ -9,11 +9,32 @@ function virtualenv_info {
} }
PROMPT=' PROMPT='
%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) %{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$GIT_PROMPT_INFO
$(virtualenv_info)$(prompt_char) ' $(virtualenv_info)$(prompt_char) '
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" git_prompt_info ()
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" {
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!" if [ -z "$(git_prompt__git_dir)" ]; then
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" GIT_PROMPT_INFO=''
ZSH_THEME_GIT_PROMPT_CLEAN="" return
fi
local prompt=""
git_prompt__branch
prompt=$GIT_PROMPT_BRANCH
git_prompt__rebase_info
prompt="${prompt}$GIT_PROMPT_REBASE_INFO"
if [[ -n "$prompt" ]]; then
git_prompt__dirty_state
if [[ "$GIT_PROMPT_DIRTY_STATE_ANY_DIRTY" = 'yes' ]]; then
prompt="$prompt%{$fg[green]%}!"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_UNTRACKED" = 'yes' ]]; then
prompt="$prompt%{$fg[green]%}?"
fi
GIT_PROMPT_INFO=" on %{$fg[magenta]%}$prompt%{$reset_color%}"
fi
}

@ -3,17 +3,28 @@ if [[ -s ~/.rvm/scripts/rvm ]] ; then
RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1" RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1"
fi fi
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}[" local R="%{$terminfo[sgr0]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch git_prompt_info ()
git_custom_status() { {
local cb=$(current_branch) if [ -z "$(git_prompt__git_dir)" ]; then
if [ -n "$cb" ]; then GIT_PROMPT_INFO=''
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" return
fi fi
git_prompt__branch
local cb=$GIT_PROMPT_BRANCH
git_prompt__rebase_info
cb="${cb}$GIT_PROMPT_REBASE_INFO"
local dirty
git_prompt__dirty_state
if [[ "$GIT_PROMPT_DIRTY_STATE_ANY_DIRTY" = 'yes' ]]; then
dirty="%{$fg[red]%}*%{$reset_color%}"
fi
GIT_PROMPT_INFO="$dirty$R%{$fg[green]%}[$cb]$R"
} }
PROMPT='$(git_custom_status)%{$fg[cyan]%}[%~% ]%{$reset_color%}%B$%b ' PROMPT='$GIT_PROMPT_INFO%{$fg[cyan]%}[%~% ]%{$reset_color%}%B$%b '

@ -1,4 +1,4 @@
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg_bold[white]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg_bold[white]%}%c %{$fg_bold[blue]%}$GIT_PROMPT_INFO%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"

@ -5,16 +5,47 @@ PROMPT='%n@%m %{$fg[$user_color]%}%~%{$reset_color%}%(!.#.>) '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}' PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}" local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}"
RPROMPT='${return_status}$(git_prompt_info)$(git_prompt_status)%{$reset_color%}' RPROMPT='${return_status}$GIT_PROMPT_INFO%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=" " git_prompt_info ()
ZSH_THEME_GIT_PROMPT_SUFFIX="" {
ZSH_THEME_GIT_PROMPT_DIRTY="" if [ -z "$(git_prompt__git_dir)" ]; then
ZSH_THEME_GIT_PROMPT_CLEAN="" GIT_PROMPT_INFO=''
return
fi
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg_bold[green]%}+" local prompt=''
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg_bold[blue]%}!"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg_bold[red]%}-" git_prompt__branch
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg_bold[magenta]%}>" prompt=" $GIT_PROMPT_BRANCH"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[yellow]%}#"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[cyan]%}?" git_prompt__rebase_info
prompt="${prompt}$GIT_PROMPT_REBASE_INFO"
git_prompt__dirty_state
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_ADDED" = 'yes' ]]; then
prompt="${prompt}%{$fg[green]%} +"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_MODIFIED" = 'yes' ]]; then
prompt="${prompt}%{$fg[blue]%} !"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_MODIFIED" = 'yes' ]]; then
prompt="${prompt}%{$fg[blue]%} !"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_DELETED" = 'yes' ]]; then
prompt="${prompt}%{$fg[red]%} -"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_DELETED" = 'yes' ]]; then
prompt="${prompt}%{$fg[red]%} -"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_RENAMED" = 'yes' ]]; then
prompt="${prompt}%{$fg[magenta]%} >"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_UNMERGED" = 'yes' ]]; then
prompt="${prompt}%{$fg[yellow]%} #"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_UNTRACKED" = 'yes' ]]; then
prompt="${prompt}%{$fg[cyan]%} ?"
fi
GIT_PROMPT_INFO=$prompt
}

@ -5,7 +5,7 @@ fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%m%{${fg_bold[magenta]}%} :: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}%#%{${reset_color}%} ' PROMPT='%m%{${fg_bold[magenta]}%} :: %{$reset_color%}%{${fg[green]}%}%3~ $GIT_PROMPT_INFO%{${fg_bold[$CARETCOLOR]}%}%#%{${reset_color}%} '
RPS1='$(vi_mode_prompt_info) ${return_code}' RPS1='$(vi_mode_prompt_info) ${return_code}'

@ -1,5 +1,5 @@
# Copied from old version of tonotdo's theme. LSCOLORS modified. # Copied from old version of tonotdo's theme. LSCOLORS modified.
PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}•%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}•%{$fg_no_bold[green]%}%3~$GIT_PROMPT_INFO%{$reset_color%}» '
RPROMPT='[%*]' RPROMPT='[%*]'
# git theming # git theming

@ -1,5 +1,5 @@
PROMPT=$' PROMPT=$'
%{$fg[blue]%}%/%{$reset_color%} $(git_prompt_info)%{$fg[white]%}[%n@%m]%{$reset_color%} %{$fg[white]%}[%T]%{$reset_color%} %{$fg[blue]%}%/%{$reset_color%} $GIT_PROMPT_INFO%{$fg[white]%}[%n@%m]%{$reset_color%} %{$fg[white]%}[%T]%{$reset_color%}
%{$fg_bold[black]%}>%{$reset_color%} ' %{$fg_bold[black]%}>%{$reset_color%} '
PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}" PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}"

@ -1,4 +1,4 @@
PROMPT='%{$fg_bold[green]%}%p %{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' PROMPT='%{$fg_bold[green]%}%p %{$fg[cyan]%}%c%{$fg_bold[blue]%}$GIT_PROMPT_INFO%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"

@ -1,7 +1,7 @@
# ZSH Theme - Preview: http://img.skitch.com/20091113-qqtd3j8xinysujg5ugrsbr7x1y.jpg # ZSH Theme - Preview: http://img.skitch.com/20091113-qqtd3j8xinysujg5ugrsbr7x1y.jpg
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg[green]%}%m%{$reset_color%} %2~ $(git_prompt_info)%{$reset_color%}%B»%b ' PROMPT='%{$fg[green]%}%m%{$reset_color%} %2~ $GIT_PROMPT_INFO%{$reset_color%}%B»%b '
RPS1="${return_code}" RPS1="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}"

@ -1,19 +1,30 @@
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}[" git_prompt_info ()
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" {
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" if [ -z "$(git_prompt__git_dir)" ]; then
ZSH_THEME_GIT_PROMPT_CLEAN="" GIT_PROMPT_INFO=''
return
fi
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch git_prompt__branch
git_custom_status() { local cb=$GIT_PROMPT_BRANCH
local cb=$(current_branch)
if [ -n "$cb" ]; then git_prompt__rebase_info
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" cb="${cb}$GIT_PROMPT_REBASE_INFO"
fi
local dirty
git_prompt__dirty_state
if [[ "$GIT_PROMPT_DIRTY_STATE_ANY_DIRTY" = 'yes' ]]; then
dirty="%{$fg[red]%}*%{$reset_color%}"
fi
local R="%{$terminfo[sgr0]%}"
GIT_PROMPT_INFO="$dirty$R%{$fg[green]%}[$cb]$R"
} }
#RVM and git settings #RVM and git settings
if [[ -s ~/.rvm/scripts/rvm ]] ; then if [[ -s ~/.rvm/scripts/rvm ]] ; then
RPS1='$(git_custom_status)%{$fg[red]%}[`~/.rvm/bin/rvm-prompt`]%{$reset_color%} $EPS1' RPS1='$GIT_PROMPT_INFO%{$fg[red]%}[`~/.rvm/bin/rvm-prompt`]%{$reset_color%} $EPS1'
fi fi
PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b ' PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b '

@ -1,4 +1,4 @@
PROMPT='%{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}% %{$reset_color%}: ' PROMPT='%{$fg[cyan]%}%c%{$fg_bold[blue]%}$GIT_PROMPT_INFO%{$fg_bold[blue]%}% %{$reset_color%}: '
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[blue]%}" ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[blue]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"

@ -1,4 +1,4 @@
PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)%#%{$reset_color%} ' PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $GIT_PROMPT_INFO%#%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="(" ZSH_THEME_GIT_PROMPT_PREFIX="("
ZSH_THEME_GIT_PROMPT_SUFFIX=") " ZSH_THEME_GIT_PROMPT_SUFFIX=") "

@ -1,5 +1,5 @@
# PROMPT="[%*] %n:%c $(git_prompt_info)%(!.#.$) " # PROMPT="[%*] %n:%c $GIT_PROMPT_INFO%(!.#.$) "
PROMPT='[%*] %{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) ' PROMPT='[%*] %{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$GIT_PROMPT_INFO %(!.#.$) '
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}git:(" ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}git:("
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"

@ -1,15 +1,51 @@
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' local R="%{$terminfo[sgr0]%}"
ZSH_THEME_GIT_PROMPT_PREFIX="(" PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$GIT_PROMPT_INFO % $R'
ZSH_THEME_GIT_PROMPT_SUFFIX=")" RPROMPT='$GIT_RPROMPT_INFO$R'
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
RPROMPT='$(git_prompt_status)%{$reset_color%}' git_prompt_info ()
{
if [ -z "$(git_prompt__git_dir)" ]; then
GIT_PROMPT_INFO=''
GIT_RPROMPT_INFO=''
return
fi
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈" local prompt=''
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗" git_prompt__branch
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦" prompt="$GIT_PROMPT_BRANCH"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ✂"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱" git_prompt__rebase_info
prompt="${prompt}$GIT_PROMPT_REBASE_INFO"
GIT_PROMPT_INFO="($prompt)"
local rprompt=''
git_prompt__dirty_state
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_ADDED" = 'yes' ]]; then
rprompt="%{$fg[cyan]%} ✈"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_MODIFIED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[yellow]%} ✭"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_MODIFIED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[yellow]%} ✭"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_DELETED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[red]%} ✗"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_DELETED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[red]%} ✗"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_RENAMED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[blue]%} ➦"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_UNMERGED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[magenta]%} ✂"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_UNTRACKED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[grey]%} ✱"
fi
GIT_RPROMPT_INFO=$rprompt
}

@ -1,4 +1,4 @@
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[white]%}$(git_prompt_info)%{$fg_bold[white]%} % %{$reset_color%}' PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[white]%}$GIT_PROMPT_INFO%{$fg_bold[white]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"

@ -32,7 +32,51 @@ preexec () {
} }
setprompt () { git_prompt_info ()
{
if [ -z "$(git_prompt__git_dir)" ]; then
GIT_PROMPT_INFO=''
return
fi
local prompt=''
git_prompt__branch
prompt=" on %{$fg[green]%}$GIT_PROMPT_BRANCH"
git_prompt__rebase_info
prompt="${prompt}$GIT_PROMPT_REBASE_INFO%{$terminfo[sgr0]%}"
git_prompt__dirty_state
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_ADDED" = 'yes' ]]; then
prompt="${prompt}%{$fg[green]%} ✚"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_MODIFIED" = 'yes' ]]; then
prompt="${prompt}%{$fg[blue]%} ✹"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_MODIFIED" = 'yes' ]]; then
prompt="${prompt}%{$fg[blue]%} ✹"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_DELETED" = 'yes' ]]; then
prompt="${prompt}%{$fg[red]%} ✖"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_DELETED" = 'yes' ]]; then
prompt="${prompt}%{$fg[red]%} ✖"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_RENAMED" = 'yes' ]]; then
prompt="${prompt}%{$fg[magenta]%} ➜"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_UNMERGED" = 'yes' ]]; then
prompt="${prompt}%{$fg[yellow]%} ═"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_UNTRACKED" = 'yes' ]]; then
prompt="${prompt}%{$fg[cyan]%} ✭"
fi
GIT_PROMPT_INFO=$prompt
}
setprompt ()
{
### ###
# Need this so the prompt will work. # Need this so the prompt will work.
@ -53,20 +97,6 @@ setprompt () {
done done
PR_NO_COLOUR="%{$terminfo[sgr0]%}" PR_NO_COLOUR="%{$terminfo[sgr0]%}"
###
# Modify Git prompt
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
### ###
# See if we can use extended characters to look nicer. # See if we can use extended characters to look nicer.
@ -119,7 +149,7 @@ $PR_GREY)$PR_CYAN$PR_SHIFT_IN$PR_HBAR$PR_URCORNER$PR_SHIFT_OUT\
$PR_CYAN$PR_SHIFT_IN$PR_LLCORNER$PR_BLUE$PR_HBAR$PR_SHIFT_OUT(\ $PR_CYAN$PR_SHIFT_IN$PR_LLCORNER$PR_BLUE$PR_HBAR$PR_SHIFT_OUT(\
$PR_YELLOW%D{%H:%M:%S}\ $PR_YELLOW%D{%H:%M:%S}\
$PR_LIGHT_BLUE%{$reset_color%}`git_prompt_info``git_prompt_status`$PR_BLUE)$PR_CYAN$PR_SHIFT_IN$PR_HBAR\ $PR_LIGHT_BLUE%{$reset_color%}$GIT_PROMPT_INFO$PR_BLUE)$PR_CYAN$PR_SHIFT_IN$PR_HBAR\
$PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT\ $PR_SHIFT_IN$PR_HBAR$PR_SHIFT_OUT\
>$PR_NO_COLOUR ' >$PR_NO_COLOUR '

@ -31,7 +31,7 @@ function josh_prompt {
prompt=" $prompt" prompt=" $prompt"
done done
prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info)%{$reset_color%} $(git_prompt_info)" prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info)%{$reset_color%} $GIT_PROMPT_INFO"
echo $prompt echo $prompt
} }

@ -4,7 +4,7 @@ if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %~ \ PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %~ \
$(git_prompt_info)\ $GIT_PROMPT_INFO\
%{$fg[red]%}%(!.#.»)%{$reset_color%} ' %{$fg[red]%}%(!.#.»)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}' PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
RPS1='${return_code}' RPS1='${return_code}'

@ -1,4 +1,4 @@
#PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' #PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$GIT_PROMPT_INFO%{$fg_bold[blue]%} % %{$reset_color%}'
PROMPT="%{$fg_bold[cyan]%}%T%{$fg_bold[green]%} %{$fg_bold[white]%}%n%{$fg[magenta]%}@%{$fg_bold[white]%}%m %{$fg_bold[green]%}%d PROMPT="%{$fg_bold[cyan]%}%T%{$fg_bold[green]%} %{$fg_bold[white]%}%n%{$fg[magenta]%}@%{$fg_bold[white]%}%m %{$fg_bold[green]%}%d
%{$fg_bold[yellow]%}%% %{$reset_color%}" %{$fg_bold[yellow]%}%% %{$reset_color%}"

@ -1,6 +1,5 @@
# ------------------------------------------------------------------------ # ------------------------------------------------------------------------
# Juan G. Hurtado oh-my-zsh theme # Juan G. Hurtado oh-my-zsh theme
# (Needs Git plugin for current_branch method)
# ------------------------------------------------------------------------ # ------------------------------------------------------------------------
# Color shortcuts # Color shortcuts
@ -16,31 +15,68 @@ WHITE_BOLD=$fg_bold[white]
BLUE_BOLD=$fg_bold[blue] BLUE_BOLD=$fg_bold[blue]
RESET_COLOR=$reset_color RESET_COLOR=$reset_color
# Format for git_prompt_info()
ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=""
# Format for parse_git_dirty() # Prompt format
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RED%}(*)" PROMPT='
ZSH_THEME_GIT_PROMPT_CLEAN="" %{$GREEN_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$GIT_PROMPT_INFO%{$RESET_COLOR%}
%{$BLUE%}>%{$RESET_COLOR%} '
RPROMPT='%{$GREEN_BOLD%}$GIT_RPROMPT_INFO%{$RESET_COLOR%}'
# Format for git_prompt_status() git_prompt_info ()
ZSH_THEME_GIT_PROMPT_UNMERGED=" %{$RED%}unmerged" {
ZSH_THEME_GIT_PROMPT_DELETED=" %{$RED%}deleted" if [ -z "$(git_prompt__git_dir)" ]; then
ZSH_THEME_GIT_PROMPT_RENAMED=" %{$YELLOW%}renamed" GIT_PROMPT_INFO=''
ZSH_THEME_GIT_PROMPT_MODIFIED=" %{$YELLOW%}modified" GIT_RPROMPT_INFO=''
ZSH_THEME_GIT_PROMPT_ADDED=" %{$GREEN%}added" return
ZSH_THEME_GIT_PROMPT_UNTRACKED=" %{$WHITE%}untracked" fi
# Format for git_prompt_ahead() local dirty=''
ZSH_THEME_GIT_PROMPT_AHEAD=" %{$RED%}(!)" git_prompt__dirty_state
if [[ "$GIT_PROMPT_DIRTY_STATE_ANY_DIRTY" = 'yes' ]]; then
dirty=" %{$RED%}(*)"
fi
git_prompt__upstream
if [[ "$GIT_PROMPT_UPSTREAM_STATE" != "=" ]]; then
local upstream=" %{$RED%}($GIT_PROMPT_UPSTREAM_STATE)"
fi
# Format for git_prompt_long_sha() and git_prompt_short_sha() GIT_PROMPT_INFO="$dirty$upstream"
ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$WHITE%}[%{$YELLOW%}"
ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE%}]"
# Prompt format git_prompt__branch
PROMPT=' local current_branch="$GIT_PROMPT_BRANCH"
%{$GREEN_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%}
%{$BLUE%}>%{$RESET_COLOR%} ' git_prompt__rebase_info
RPROMPT='%{$GREEN_BOLD%}$(current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}' current_branch="${current_branch}$GIT_PROMPT_REBASE_INFO"
local sha=$(git rev-parse --short HEAD 2> /dev/null)
if [[ -n "$sha" ]]; then
sha=" %{$WHITE%}[%{$YELLOW%}$sha%{$WHITE%}]"
fi
local git_status=''
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_ADDED" = 'yes' ]]; then
git_status="%{$GREEN%} added"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_MODIFIED" = 'yes' ]]; then
git_status="${git_status}%{$YELLOW%} modified"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_MODIFIED" = 'yes' ]]; then
git_status="${git_status}%{$YELLOW%} modified"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_DELETED" = 'yes' ]]; then
git_status="${git_status}%{$RED%} deleted"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_DELETED" = 'yes' ]]; then
git_status="${git_status}%{$RED%} deleted"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_RENAMED" = 'yes' ]]; then
git_status="${git_status}%{$YELLOW%} renamed"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_UNMERGED" = 'yes' ]]; then
git_status="${git_status}%{$RED%} unmerged"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_UNTRACKED" = 'yes' ]]; then
git_status="${git_status}%{$WHITE%} untracked"
fi
GIT_RPROMPT_INFO="$current_branch$sha$git_status"
}

@ -5,7 +5,7 @@ function get_host {
} }
PROMPT='> ' PROMPT='> '
RPROMPT='%~$(git_prompt_info)$(get_host)' RPROMPT='%~$GIT_PROMPT_INFO$(get_host)'
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$reset_color%}" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_PREFIX="(" ZSH_THEME_GIT_PROMPT_PREFIX="("

@ -1,7 +1,7 @@
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg[green]%}%c \ PROMPT='%{$fg[green]%}%c \
$(git_prompt_info)\ $GIT_PROMPT_INFO\
%{$fg[red]%}%(!.#.»)%{$reset_color%} ' %{$fg[red]%}%(!.#.»)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}' PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
RPS1='%{$fg[blue]%}%~%{$reset_color%} ${return_code} ' RPS1='%{$fg[blue]%}%~%{$reset_color%} ${return_code} '

@ -6,45 +6,66 @@
# SCREENSHOT: # SCREENSHOT:
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
PROMPT='[%{$fg[red]%}%n%{$reset_color%}@%{$fg[magenta]%}%m%{$reset_color%}:%{$fg[blue]%}%~%{$reset_color%}$(git_prompt_info)] local R="%{$terminfo[sgr0]%}"
%# ' local MAGENTA="%{$fg[magenta]%}"
local YELLOW="%{$fg[yellow]%}"
local GREEN="%{$fg[green]%}"
local BLUE="%{$fg[blue]%}"
local CYAN="%{$fg[cyan]%}"
local RED="%{$fg[red]%}"
fi
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[green]%}" PROMPT='[$RED%n$R@$MAGENTA%m$R:$BLUE%~$R$GIT_PROMPT_INFO]
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" %# '
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
# display exitcode on the right when >0 # display exitcode on the right when >0
return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" return_code="%(?..$RED%? ↵$R)"
RPROMPT='${return_code}$GIT_RPROMPT_INFO$R'
RPROMPT='${return_code}$(git_prompt_status)%{$reset_color%}' git_prompt_info ()
{
if [ -z "$(git_prompt__git_dir)" ]; then
GIT_PROMPT_INFO=''
GIT_RPROMPT_INFO=''
return
fi
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚" local branch=''
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
else
PROMPT='[%n@%m:%~$(git_prompt_info)]
%# '
ZSH_THEME_GIT_PROMPT_PREFIX=" on" git_prompt__branch
ZSH_THEME_GIT_PROMPT_SUFFIX="" branch="$GIT_PROMPT_BRANCH"
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
# display exitcode on the right when >0 git_prompt__rebase_info
return_code="%(?..%? ↵)" branch="${branch}$GIT_PROMPT_REBASE_INFO"
RPROMPT='${return_code}$(git_prompt_status)' GIT_PROMPT_INFO=" on $GREEN${branch}$R"
ZSH_THEME_GIT_PROMPT_ADDED=" ✚" local rprompt=''
ZSH_THEME_GIT_PROMPT_MODIFIED=" ✹" git_prompt__dirty_state
ZSH_THEME_GIT_PROMPT_DELETED=" ✖" if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_ADDED" = 'yes' ]]; then
ZSH_THEME_GIT_PROMPT_RENAMED=" ➜" rprompt="$GREEN ✚"
ZSH_THEME_GIT_PROMPT_UNMERGED=" ═" fi
ZSH_THEME_GIT_PROMPT_UNTRACKED=" ✭" if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_MODIFIED" = 'yes' ]]; then
fi rprompt="${rprompt}$BLUE ✹"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_MODIFIED" = 'yes' ]]; then
rprompt="${rprompt}$BLUE ✹"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_DELETED" = 'yes' ]]; then
rprompt="${rprompt}$RED ✖"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_DELETED" = 'yes' ]]; then
rprompt="${rprompt}$RED ✖"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_RENAMED" = 'yes' ]]; then
rprompt="${rprompt}$MAGENTA ➜"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_UNMERGED" = 'yes' ]]; then
rprompt="${rprompt}$YELLOW ═"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_UNTRACKED" = 'yes' ]]; then
rprompt="${rprompt}$CYAN ✭"
fi
GIT_RPROMPT_INFO=$rprompt
}

@ -1,6 +1,6 @@
# ZSH Theme - Preview: http://cl.ly/350F0F0k1M2y3A2i3p1S # ZSH Theme - Preview: http://cl.ly/350F0F0k1M2y3A2i3p1S
PROMPT='λ %~/ $(git_prompt_info)%{$reset_color%}' PROMPT='λ %~/ $GIT_PROMPT_INFO%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "

@ -3,7 +3,7 @@
local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})" local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $(git_prompt_info)%{$reset_color%}%B»%b ' PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $GIT_PROMPT_INFO%{$reset_color%}%B»%b '
RPS1="${return_code}" RPS1="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}(" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("

@ -1,7 +1,7 @@
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png # ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}$(~/.rvm/bin/rvm-prompt i v) %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b ' PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}$(~/.rvm/bin/rvm-prompt i v) %{$reset_color%} $GIT_PROMPT_INFO%{$reset_color%}%B$%b '
RPS1="${return_code}" RPS1="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}"

@ -1,7 +1,7 @@
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png # ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}$(~/.rvm/bin/rvm-prompt i v) %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b ' PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}$(~/.rvm/bin/rvm-prompt i v) %{$reset_color%} $GIT_PROMPT_INFO%{$reset_color%}%B$%b '
RPS1="${return_code}" RPS1="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}"

@ -1,6 +1,6 @@
# Theme with full path names and hostname # Theme with full path names and hostname
# Handy if you work on different servers all the time; # Handy if you work on different servers all the time;
PROMPT='%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[yellow]%}%M:%{$fg[green]%}%/%{$reset_color%} $(git_prompt_info) %(!.#.$) ' PROMPT='%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[yellow]%}%M:%{$fg[green]%}%/%{$reset_color%} $GIT_PROMPT_INFO %(!.#.$) '
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}git:(" ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}git:("
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"

@ -1,4 +1,4 @@
PROMPT='%{$fg_bold[magenta]%}%1~$(git_prompt_info) %{$fg_bold[magenta]%}%# %{$reset_color%}' PROMPT='%{$fg_bold[magenta]%}%1~$GIT_PROMPT_INFO %{$fg_bold[magenta]%}%# %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}[" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"

@ -3,13 +3,5 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$reset_color%}" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="" ZSH_THEME_GIT_PROMPT_CLEAN=""
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
git_custom_status() {
local cb=$(current_branch)
if [ -n "$cb" ]; then
echo "- $ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
fi
}
PROMPT='%2~ $GIT_PROMPT_INFO »%b '
PROMPT='%2~ $(git_custom_status) »%b '

@ -1,5 +1,5 @@
PROMPT='%{$fg_bold[red]%}%m%{$reset_color%}:%{$fg[cyan]%}%c%{$reset_color%}:%# ' PROMPT='%{$fg_bold[red]%}%m%{$reset_color%}:%{$fg[cyan]%}%c%{$reset_color%}:%# '
RPROMPT='%{$fg_bold[green]%}$(git_prompt_info)%{$reset_color%}% ' RPROMPT='%{$fg_bold[green]%}$GIT_PROMPT_INFO%{$reset_color%}% '
ZSH_THEME_GIT_PROMPT_PREFIX="<%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_PREFIX="<%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"

@ -2,7 +2,7 @@ local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}' local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
local current_dir='%{$terminfo[bold]$fg[blue]%}%~%{$reset_color%}' local current_dir='%{$terminfo[bold]$fg[blue]%}%~%{$reset_color%}'
local rvm_ruby='%{$fg[red]%}$(rvm_prompt_info)%{$reset_color%}' local rvm_ruby='%{$fg[red]%}$(rvm_prompt_info)%{$reset_color%}'
local git_branch='%{$fg[blue]%}$(git_prompt_info)%{$reset_color%}' local git_branch='%{$fg[blue]%}$GIT_PROMPT_INFO%{$reset_color%}'
PROMPT="${user_host}:${current_dir} ${rvm_ruby} PROMPT="${user_host}:${current_dir} ${rvm_ruby}
${git_branch} %B$%b " ${git_branch} %B$%b "

@ -1,30 +1,71 @@
#!/usr/bin/env zsh #!/usr/bin/env zsh
#local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" local R="%{$terminfo[sgr0]%}"
#local return_code="%(?..%{$fg[red]%}%? ↵$R)"
setopt promptsubst setopt promptsubst
autoload -U add-zsh-hook autoload -U add-zsh-hook
PROMPT_SUCCESS_COLOR=$FG[117]
PROMPT_FAILURE_COLOR=$FG[124] PROMPT_FAILURE_COLOR=$FG[124]
PROMPT_VCS_INFO_COLOR=$FG[242] PROMPT_VCS_INFO_COLOR=$FG[242]
PROMPT_PROMPT=$FG[077] PROMPT_PROMPT=$FG[077]
GIT_DIRTY_COLOR=$FG[133] GIT_DIRTY_COLOR=$FG[133]
GIT_CLEAN_COLOR=$FG[118] GIT_CLEAN_COLOR=$FG[118]
GIT_PROMPT_INFO=$FG[012] GIT_PROMPT_DEFAULT=$FG[012]
PROMPT='%{$PROMPT_SUCCESS_COLOR%}%~%{$reset_color%} %{$GIT_PROMPT_INFO%}$(git_prompt_info)%{$GIT_DIRTY_COLOR%}$(git_prompt_status) %{$reset_color%}%{$PROMPT_PROMPT%}ᐅ%{$reset_color%} ' PROMPT='%{$FG[117]%}%~ $GIT_PROMPT_INFO $R%{$PROMPT_PROMPT%}ᐅ$R '
#RPS1="${return_code}" #RPS1="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="(" git_prompt_info ()
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$GIT_PROMPT_INFO%})" {
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$GIT_DIRTY_COLOR%}✘" if [ -z "$(git_prompt__git_dir)" ]; then
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$GIT_CLEAN_COLOR%}✔" GIT_PROMPT_INFO=''
GIT_RPROMPT_INFO=''
ZSH_THEME_GIT_PROMPT_ADDED="%{$FG[082]%}✚%{$reset_color%}" return
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$FG[166]%}✹%{$reset_color%}" fi
ZSH_THEME_GIT_PROMPT_DELETED="%{$FG[160]%}✖%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$FG[220]%}➜%{$reset_color%}" local branch=''
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$FG[082]%}═%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[190]%}✭%{$reset_color%}" git_prompt__branch
branch="$GIT_PROMPT_BRANCH"
git_prompt__rebase_info
branch="${branch}$GIT_PROMPT_REBASE_INFO"
local dirty=''
git_prompt__dirty_state
if [[ "$GIT_PROMPT_DIRTY_STATE_ANY_DIRTY" = 'yes' ]]; then
dirty=" %{$GIT_DIRTY_COLOR%}✘"
else
dirty=" %{$GIT_CLEAN_COLOR%}✔"
fi
local prompt="($R%{${branch}${dirty}%{$FG[012]%})"
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_ADDED" = 'yes' ]]; then
prompt="${prompt}%{$FG[082]%}✚"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_MODIFIED" = 'yes' ]]; then
prompt="${prompt}%{$FG[166]%}✹"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_MODIFIED" = 'yes' ]]; then
prompt="${prompt}%{$FG[166]%}✹"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_DELETED" = 'yes' ]]; then
prompt="${prompt}%{$FG[160]%}✖"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_DELETED" = 'yes' ]]; then
prompt="${prompt}%{$FG[160]%}✖"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_RENAMED" = 'yes' ]]; then
prompt="${prompt}%{$FG[220]%}➜"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_UNMERGED" = 'yes' ]]; then
prompt="${prompt}%{$FG[082]%}═"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_UNTRACKED" = 'yes' ]]; then
prompt="${prompt}%{$FG[90]%}✭"
fi
GIT_PROMPT_INFO="$prompt$R"
}

@ -1,5 +1,5 @@
PROMPT='%F{green}%2c%F{blue} [%f ' PROMPT='%F{green}%2c%F{blue} [%f '
RPROMPT='$(git_prompt_info) %F{blue}] %F{green}%D{%L:%M} %F{yellow}%D{%p}%f' RPROMPT='$GIT_PROMPT_INFO %F{blue}] %F{green}%D{%L:%M} %F{yellow}%D{%p}%f'
ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}" ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%f" ZSH_THEME_GIT_PROMPT_SUFFIX="%f"

@ -2,7 +2,7 @@ if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg[green]%}[%*]%{$reset_color%} %{$fg_no_bold[cyan]%}%n %{${fg_bold[blue]}%}::%{$reset_color%} %{$fg[yellow]%}%m%{$reset_color%} %{$fg_no_bold[magenta]%} ➜ %{$reset_color%} %{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} ' PROMPT='%{$fg[green]%}[%*]%{$reset_color%} %{$fg_no_bold[cyan]%}%n %{${fg_bold[blue]}%}::%{$reset_color%} %{$fg[yellow]%}%m%{$reset_color%} %{$fg_no_bold[magenta]%} ➜ %{$reset_color%} %{${fg[green]}%}%3~ $GIT_PROMPT_INFO%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} '
RPS1="${return_code}" RPS1="${return_code}"

@ -1,6 +1,6 @@
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $GIT_PROMPT_INFO%(!.#.$) '
RPROMPT='[%*]' RPROMPT='[%*]'
# git theming # git theming

@ -2,7 +2,7 @@ if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
PROMPT=' PROMPT='
%{$fg[$NCOLOR]%}%B%n@%m%b%{$reset_color%} %{$fg[white]%}%B${PWD/#$HOME/~}%b%{$reset_color%} %{$fg[$NCOLOR]%}%B%n@%m%b%{$reset_color%} %{$fg[white]%}%B${PWD/#$HOME/~}%b%{$reset_color%}
$(git_prompt_info)%(!.#.$) ' $GIT_PROMPT_INFO%(!.#.$) '
RPROMPT='[%*]' RPROMPT='[%*]'
# git theming # git theming

@ -3,7 +3,7 @@ if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="magenta"; f
local return_code="%(?..%{$fg_bold[red]%}:( %?%{$reset_color%})" local return_code="%(?..%{$fg_bold[red]%}:( %?%{$reset_color%})"
PROMPT=' PROMPT='
%{$fg_bold[cyan]%}%n%{$reset_color%}%{$fg[yellow]%}@%{$reset_color%}%{$fg_bold[blue]%}%m%{$reset_color%}:%{${fg_bold[green]}%}%~%{$reset_color%}$(git_prompt_info) %{$fg_bold[cyan]%}%n%{$reset_color%}%{$fg[yellow]%}@%{$reset_color%}%{$fg_bold[blue]%}%m%{$reset_color%}:%{${fg_bold[green]}%}%~%{$reset_color%}$GIT_PROMPT_INFO
%{${fg[$CARETCOLOR]}%}%# %{${reset_color}%}' %{${fg[$CARETCOLOR]}%}%# %{${reset_color}%}'
RPS1='${return_code} %D - %*' RPS1='${return_code} %D - %*'
@ -13,3 +13,33 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%} ±" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%} ±"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ?" ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ?"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[red]%} ♥" ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[red]%} ♥"
git_prompt_info ()
{
if [ -z "$(git_prompt__git_dir)" ]; then
GIT_PROMPT_INFO=''
return
fi
local prompt=""
git_prompt__branch
prompt=$GIT_PROMPT_BRANCH
git_prompt__rebase_info
prompt="${prompt}$GIT_PROMPT_REBASE_INFO"
if [[ -n "$prompt" ]]; then
git_prompt__dirty_state
if [[ "$GIT_PROMPT_DIRTY_STATE_ANY_DIRTY" = 'yes' ]]; then
prompt="$prompt%{$fg_bold[red]%}±"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_UNTRACKED" = 'yes' ]]; then
prompt="$prompt%{$fg[cyan]%}?"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_ANY_DIRTY" = 'no' ]]; then
prompt="$prompt%{$fg_bold[red]%}♥"
fi
GIT_PROMPT_INFO="%{$fg_bold[magenta]%}^%{$reset_color%}%{$fg_bold[yellow]%}$prompt%{$reset_color%}"
fi
}

@ -1,6 +1,6 @@
PROMPT=' PROMPT='
%n@%m %{$fg[cyan]%}%~ %n@%m %{$fg[cyan]%}%~
%? $(git_prompt_info)%{$fg_bold[blue]%}%% %{$reset_color%}' %? $GIT_PROMPT_INFO%{$fg_bold[blue]%}%% %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "

@ -1,6 +1,6 @@
# -*- sh -*- vim:set ft=sh ai et sw=4 sts=4: # -*- sh -*- vim:set ft=sh ai et sw=4 sts=4:
# It might be bash like, but I can't have my co-workers knowing I use zsh # It might be bash like, but I can't have my co-workers knowing I use zsh
PROMPT='%{$fg[green]%}%n@%m:%{$fg_bold[blue]%}%2~ $(git_prompt_info)%{$reset_color%}%(!.#.$) ' PROMPT='%{$fg[green]%}%n@%m:%{$fg_bold[blue]%}%2~ $GIT_PROMPT_INFO%{$reset_color%}%(!.#.$) '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"

@ -14,7 +14,7 @@ function prompt_char {
RIXIUS_PRE="%{$bg[white]%}%{$fg[red]%}" RIXIUS_PRE="%{$bg[white]%}%{$fg[red]%}"
PROMPT=' PROMPT='
%{$RIXIUS_PRE%}%n%{$reset_color%} in %{$fg_bold[green]%}$(collapse_pwd)%{$reset_color%}$(git_prompt_info) %{$RIXIUS_PRE%}%n%{$reset_color%} in %{$fg_bold[green]%}$(collapse_pwd)%{$reset_color%}$GIT_PROMPT_INFO
$(prompt_char) ' $(prompt_char) '
RPROMPT='%{$RIXIUS_PRE%}%T%{$reset_color%}' RPROMPT='%{$RIXIUS_PRE%}%T%{$reset_color%}'

@ -1,4 +1,4 @@
PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$GIT_PROMPT_INFO%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"

@ -1,4 +1,4 @@
PROMPT='%{$fg[green]%}%~%{$fg_bold[blue]%}$(git_prompt_info)%{$reset_color%} ' PROMPT='%{$fg[green]%}%~%{$fg_bold[blue]%}$GIT_PROMPT_INFO%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="(" ZSH_THEME_GIT_PROMPT_PREFIX="("
ZSH_THEME_GIT_PROMPT_SUFFIX=")" ZSH_THEME_GIT_PROMPT_SUFFIX=")"

@ -1,4 +1,4 @@
PROMPT='%{$fg_bold[green]%}%h %{$fg[cyan]%}%2~ %{$fg_bold[blue]%}$(git_prompt_info) %{$reset_color%}» ' PROMPT='%{$fg_bold[green]%}%h %{$fg[cyan]%}%2~ %{$fg_bold[blue]%}$GIT_PROMPT_INFO %{$reset_color%}» '
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"

@ -2,47 +2,72 @@
# FILE: sorin.zsh-theme # FILE: sorin.zsh-theme
# DESCRIPTION: oh-my-zsh theme file. # DESCRIPTION: oh-my-zsh theme file.
# AUTHOR: Sorin Ionescu (sorin.ionescu@gmail.com) # AUTHOR: Sorin Ionescu (sorin.ionescu@gmail.com)
# VERSION: 1.0.3 # VERSION: 1.0.4
# SCREENSHOT: http://i.imgur.com/aipDQ.png # SCREENSHOT: http://i.imgur.com/aipDQ.png
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
if [[ "$DISABLE_COLOR" != "true" ]]; then if [[ "$DISABLE_COLORS" != "true" ]]; then
MODE_INDICATOR="%{$fg_bold[red]%}%{$reset_color%}%{$fg[red]%}%{$reset_color%}" local R="%{$terminfo[sgr0]%}"
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}" local MAGENTA="%{$fg[magenta]%}"
local YELLOW="%{$fg[yellow]%}"
local GREEN="%{$fg[green]%}"
local B_GREEN="%{$fg_bold[green]%}"
local BLUE="%{$fg[blue]%}"
local CYAN="%{$fg[cyan]%}"
local RED="%{$fg[red]%}"
local B_RED="%{$fg_bold[red]%}"
fi
PROMPT='%{$fg[cyan]%}%c$(git_prompt_info) %(!.%{$fg_bold[red]%}#.%{$fg_bold[green]%})%{$reset_color%} ' MODE_INDICATOR="$B_RED$R$RED$R"
local return_status="$RED%(?..⏎)$R"
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}git%{$reset_color%}:%{$fg[red]%}" PROMPT='$CYAN%c$GIT_PROMPT_INFO %(!.$B_RED#.$B_GREEN)$R '
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" RPROMPT='${return_status}$GIT_RPROMPT_INFO$R'
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
RPROMPT='${return_status}$(git_prompt_status)%{$reset_color%}' git_prompt_info ()
{
if [ -z "$(git_prompt__git_dir)" ]; then
GIT_PROMPT_INFO=''
GIT_RPROMPT_INFO=''
return
fi
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚" local branch=''
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
else
MODE_INDICATOR=""
local return_status="%(?::⏎)"
PROMPT='%c$(git_prompt_info) %(!.#.) ' git_prompt__branch
branch="$GIT_PROMPT_BRANCH"
ZSH_THEME_GIT_PROMPT_PREFIX=" git:" git_prompt__rebase_info
ZSH_THEME_GIT_PROMPT_SUFFIX="" branch="${branch}$GIT_PROMPT_REBASE_INFO"
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
RPROMPT='${return_status}$(git_prompt_status)' GIT_PROMPT_INFO=" ${BLUE}git$R:$RED${branch}$R"
ZSH_THEME_GIT_PROMPT_ADDED=" ✚" local rprompt=''
ZSH_THEME_GIT_PROMPT_MODIFIED=" ✹" git_prompt__dirty_state
ZSH_THEME_GIT_PROMPT_DELETED=" ✖" if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_ADDED" = 'yes' ]]; then
ZSH_THEME_GIT_PROMPT_RENAMED=" ➜" rprompt="$GREEN ✚"
ZSH_THEME_GIT_PROMPT_UNMERGED=" ═" fi
ZSH_THEME_GIT_PROMPT_UNTRACKED=" ✭" if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_MODIFIED" = 'yes' ]]; then
fi rprompt="${rprompt}$BLUE ✹"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_MODIFIED" = 'yes' ]]; then
rprompt="${rprompt}$BLUE ✹"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_DELETED" = 'yes' ]]; then
rprompt="${rprompt}$RED ✖"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_DELETED" = 'yes' ]]; then
rprompt="${rprompt}$RED ✖"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_RENAMED" = 'yes' ]]; then
rprompt="${rprompt}$MAGENTA ➜"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_UNMERGED" = 'yes' ]]; then
rprompt="${rprompt}$YELLOW ═"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_UNTRACKED" = 'yes' ]]; then
rprompt="${rprompt}$CYAN ✭"
fi
GIT_RPROMPT_INFO=$rprompt
}

@ -3,7 +3,7 @@
# Preview - http://www.flickr.com/photos/adelcampo/4556482563/sizes/o/ # Preview - http://www.flickr.com/photos/adelcampo/4556482563/sizes/o/
# based on robbyrussell's shell but louder! # based on robbyrussell's shell but louder!
PROMPT='%{$fg_bold[blue]%}$(git_prompt_info) %F{208}%c%f PROMPT='%{$fg_bold[blue]%}$GIT_PROMPT_INFO %F{208}%c%f
%{$fg_bold[white]%}%# %{$reset_color%}' %{$fg_bold[white]%}%# %{$reset_color%}'
RPROMPT='%B%F{208}%n%f%{$fg_bold[white]%}@%F{039}%m%f%{$reset_color%}' RPROMPT='%B%F{208}%n%f%{$fg_bold[white]%}@%F{039}%m%f%{$reset_color%}'

@ -10,8 +10,6 @@ PROMPT_BRACKET_END='%{$fg_bold[white]%}]'
PROMPT_USER='%{$fg_bold[white]%}%n' PROMPT_USER='%{$fg_bold[white]%}%n'
PROMPT_SIGN='%{$reset_color%}%#' PROMPT_SIGN='%{$reset_color%}%#'
GIT_PROMPT_INFO='$(git_prompt_info)'
# My current prompt looks like: # My current prompt looks like:
# [host:current_dir] (git_prompt_info) # [host:current_dir] (git_prompt_info)
# [username]% # [username]%

@ -1,16 +1,49 @@
# Comment
PROMPT='%{$fg[magenta]%}[%c] %{$reset_color%}' PROMPT='%{$fg[magenta]%}[%c] %{$reset_color%}'
RPROMPT='%{$fg[magenta]%}$GIT_PROMPT_INFO%{$reset_color%} $GIT_RPROMPT_INFO%{$reset_color%}'
git_prompt_info ()
{
if [ -z "$(git_prompt__git_dir)" ]; then
GIT_PROMPT_INFO=''
GIT_RPROMPT_INFO=''
return
fi
local prompt=''
git_prompt__branch
prompt="$GIT_PROMPT_BRANCH"
git_prompt__rebase_info
prompt="${prompt}$GIT_PROMPT_REBASE_INFO"
RPROMPT='%{$fg[magenta]%}$(git_prompt_info)%{$reset_color%} $(git_prompt_status)%{$reset_color%}' GIT_PROMPT_INFO="$prompt"
ZSH_THEME_GIT_PROMPT_PREFIX="" local rprompt=''
ZSH_THEME_GIT_PROMPT_SUFFIX="" git_prompt__dirty_state
ZSH_THEME_GIT_PROMPT_DIRTY="" if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_ADDED" = 'yes' ]]; then
ZSH_THEME_GIT_PROMPT_CLEAN="" rprompt="%{$fg[cyan]%} ✈"
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈" fi
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭" if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_MODIFIED" = 'yes' ]]; then
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗" rprompt="${rprompt}%{$fg[yellow]%} ✭"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦" fi
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ✂" if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_MODIFIED" = 'yes' ]]; then
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱" rprompt="${rprompt}%{$fg[yellow]%} ✭"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_DELETED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[red]%} ✗"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_DELETED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[red]%} ✗"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_RENAMED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[blue]%} ➦"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_INDEX_UNMERGED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[magenta]%} ✂"
fi
if [[ "$GIT_PROMPT_DIRTY_STATE_WORKTREE_UNTRACKED" = 'yes' ]]; then
rprompt="${rprompt}%{$fg[grey]%} ✱"
fi
GIT_RPROMPT_INFO=$rprompt
}

@ -17,7 +17,7 @@ patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset
} }
PROMPT=' PROMPT='
%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) %{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$GIT_PROMPT_INFO
$(virtualenv_info)$(prompt_char) ' $(virtualenv_info)$(prompt_char) '
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"

@ -9,7 +9,7 @@ function prompt_char {
PROMPT='%(?, ,%{$fg[red]%}FAIL: $?%{$reset_color%} PROMPT='%(?, ,%{$fg[red]%}FAIL: $?%{$reset_color%}
) )
%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info) %{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$GIT_PROMPT_INFO
%_$(prompt_char) ' %_$(prompt_char) '
RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}' RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'

@ -1,4 +1,4 @@
PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}➜%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}➜%{$fg_no_bold[green]%}%3~$GIT_PROMPT_INFO%{$reset_color%}» '
RPROMPT='[%*]' RPROMPT='[%*]'
# git theming # git theming

@ -1,4 +1,4 @@
PROMPT='%{${fg_bold[yellow]}%}%n%{$reset_color%}%{${fg[yellow]}%}@%m%{$reset_color%} $(git_prompt_info)%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )%{$fg[yellow]%}%#%{$reset_color%} ' PROMPT='%{${fg_bold[yellow]}%}%n%{$reset_color%}%{${fg[yellow]}%}@%m%{$reset_color%} $GIT_PROMPT_INFO%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )%{$fg[yellow]%}%#%{$reset_color%} '
RPROMPT='%{$fg[green]%}%~%{$reset_color%}' RPROMPT='%{$fg[green]%}%~%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}(" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}("

@ -1,4 +1,4 @@
PROMPT='$(git_prompt_info)%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )%{$fg[yellow]%}%#%{$reset_color%} ' PROMPT='$GIT_PROMPT_INFO%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )%{$fg[yellow]%}%#%{$reset_color%} '
RPROMPT='%{$fg[green]%}%~%{$reset_color%}' RPROMPT='%{$fg[green]%}%~%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}(" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}("

@ -2,5 +2,5 @@
# on two lines for easier vgrepping # on two lines for easier vgrepping
# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 # entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <$(git_prompt_info)>%{\e[0m%}%b ' %{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <$GIT_PROMPT_INFO>%{\e[0m%}%b '
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '

Loading…
Cancel
Save