summaryrefslogtreecommitdiff
path: root/themes/lukerandall.zsh-theme
diff options
context:
space:
mode:
authorJames Smith <james@loopj.com>2011-08-01 00:44:51 -0700
committerJames Smith <james@loopj.com>2011-08-01 00:44:51 -0700
commit0ba398f9e1aaf05e72406d5c840f013eebb6b260 (patch)
tree66a866657780870fcfb338606ec92b29da82eb4c /themes/lukerandall.zsh-theme
parenta15a8c4a98bc1aff024c3ef44dec48309ff4f90b (diff)
parenta738ca9b645c3cc53bdb01e8676202ceca449ccf (diff)
downloadzsh-0ba398f9e1aaf05e72406d5c840f013eebb6b260.tar.gz
zsh-0ba398f9e1aaf05e72406d5c840f013eebb6b260.tar.bz2
zsh-0ba398f9e1aaf05e72406d5c840f013eebb6b260.zip
Merge in recent stuff
Diffstat (limited to 'themes/lukerandall.zsh-theme')
-rw-r--r--themes/lukerandall.zsh-theme16
1 files changed, 15 insertions, 1 deletions
diff --git a/themes/lukerandall.zsh-theme b/themes/lukerandall.zsh-theme
index 24a0612b7..f4045bd8e 100644
--- a/themes/lukerandall.zsh-theme
+++ b/themes/lukerandall.zsh-theme
@@ -3,8 +3,22 @@
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 '
+function my_git_prompt_info() {
+ ref=$(git symbolic-ref HEAD 2> /dev/null) || return
+ GIT_STATUS=$(git_prompt_status)
+ [[ -n $GIT_STATUS ]] && GIT_STATUS=" $GIT_STATUS"
+ echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$GIT_STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX"
+}
+
+PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $(my_git_prompt_info)%{$reset_color%}%B»%b '
RPS1="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_UNTRACKED="%%"
+ZSH_THEME_GIT_PROMPT_ADDED="+"
+ZSH_THEME_GIT_PROMPT_MODIFIED="*"
+ZSH_THEME_GIT_PROMPT_RENAMED="~"
+ZSH_THEME_GIT_PROMPT_DELETED="!"
+ZSH_THEME_GIT_PROMPT_UNMERGED="?"
+