You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
13 years ago
|
#
|
||
|
# A monochrome theme that displays basic information.
|
||
|
#
|
||
|
# Authors:
|
||
|
# Brian Tse <briankftse@gmail.com>
|
||
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||
|
#
|
||
|
|
||
14 years ago
|
function +vi-git-status() {
|
||
|
# Untracked files.
|
||
|
if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
|
||
|
hook_com[unstaged]='%F{red}●%f'
|
||
|
fi
|
||
|
}
|
||
|
|
||
13 years ago
|
function prompt_minimal_precmd {
|
||
14 years ago
|
vcs_info
|
||
|
}
|
||
|
|
||
13 years ago
|
function prompt_minimal_setup {
|
||
13 years ago
|
setopt LOCAL_OPTIONS
|
||
|
unsetopt XTRACE KSH_ARRAYS
|
||
|
prompt_opts=(cr percent subst)
|
||
14 years ago
|
|
||
|
autoload -Uz add-zsh-hook
|
||
|
autoload -Uz vcs_info
|
||
|
|
||
|
add-zsh-hook precmd prompt_minimal_precmd
|
||
|
|
||
|
zstyle ':vcs_info:*' enable bzr git hg svn
|
||
|
zstyle ':vcs_info:*' check-for-changes true
|
||
|
zstyle ':vcs_info:*' stagedstr '%F{green}●%f'
|
||
|
zstyle ':vcs_info:*' unstagedstr '%F{yellow}●%f'
|
||
|
zstyle ':vcs_info:*' formats ' - [%b%c%u]'
|
||
|
zstyle ':vcs_info:*' actionformats " - [%b%c%u|%F{cyan}%a%f]"
|
||
|
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b|%F{cyan}%r%f'
|
||
|
zstyle ':vcs_info:git*+set-message:*' hooks git-status
|
||
|
|
||
|
PROMPT='%2~${vcs_info_msg_0_} » '
|
||
|
}
|
||
|
|
||
|
prompt_minimal_setup "$@"
|
||
|
|