Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh into test-pull

Conflicts:
	themes/agnoster.zsh-theme
	tools/install.sh
This commit is contained in:
Aaron Biggs 2014-06-11 08:59:00 -05:00
commit ca14eb83b4
121 changed files with 4113 additions and 1248 deletions

View file

@ -6,7 +6,7 @@
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
#
# In addition, I recommend the
# [Solarized theme](https://github.com/altercation/solarized/) and, if you're
@ -69,7 +69,9 @@ prompt_context() {
# Git: branch/detached head, dirty status
prompt_git() {
local ref dirty
local ref dirty mode repo_path
repo_path=$(git rev-parse --git-dir 2>/dev/null)
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
dirty=$(parse_git_dirty)
ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)"
@ -79,6 +81,14 @@ prompt_git() {
prompt_segment green black
fi
if [[ -e "${repo_path}/BISECT_LOG" ]]; then
mode=" <B>"
elif [[ -e "${repo_path}/MERGE_HEAD" ]]; then
mode=" >M<"
elif [[ -e "${repo_path}/rebase" || -e "${repo_path}/rebase-apply" || -e "${repo_path}/rebase-merge" || -e "${repo_path}/../.dotest" ]]; then
mode=" >R>"
fi
setopt promptsubst
autoload -Uz vcs_info
@ -88,9 +98,9 @@ prompt_git() {
zstyle ':vcs_info:*' stagedstr '✚'
zstyle ':vcs_info:git:*' unstagedstr '●'
zstyle ':vcs_info:*' formats ' %u%c'
zstyle ':vcs_info:*' actionformats '%u%c'
zstyle ':vcs_info:*' actionformats ' %u%c'
vcs_info
echo -n "${ref/refs\/heads\//⭠ }${vcs_info_msg_0_}"
echo -n "${ref/refs\/heads\//⭠ }${vcs_info_msg_0_%% }${mode}"
fi
}