|
|
|
@ -1,12 +1,12 @@
|
|
|
|
|
#
|
|
|
|
|
# A colorful, friendly, multiline theme with some handy features.
|
|
|
|
|
# A colourful, friendly, multiline theme with some handy features.
|
|
|
|
|
#
|
|
|
|
|
# Authors:
|
|
|
|
|
# Paul Gideon Dann <pdgiddie@gmail.com>
|
|
|
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
|
|
|
#
|
|
|
|
|
# Features:
|
|
|
|
|
# - Simple VCS branch, staged and unstaged indication.
|
|
|
|
|
# - Simple VCS branch, staged, and unstaged indication.
|
|
|
|
|
# - Prompt character is different in a VCS repository.
|
|
|
|
|
# - Last command exit status is displayed when non-zero.
|
|
|
|
|
#
|
|
|
|
@ -14,10 +14,11 @@
|
|
|
|
|
# http://i.imgur.com/rCo3S.png
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
# Hook for vcs_info set-message (see zshcontrib man page)
|
|
|
|
|
function +vi-git-status() {
|
|
|
|
|
# Check for untracked files or updated submodules since vcs_info does not.
|
|
|
|
|
# Check for untracked files, since vcs_info does not.
|
|
|
|
|
if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
|
|
|
|
|
hook_com[unstaged]='%F{green}!%f'
|
|
|
|
|
hook_com[unstaged]+='%F{green}?%f'
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -28,10 +29,10 @@ function prompt_giddie_precmd {
|
|
|
|
|
# Choose prompt symbol based on whether or not we are in a repository.
|
|
|
|
|
if (( $+commands[git] )) && git rev-parse 2> /dev/null; then
|
|
|
|
|
_prompt_giddie_symbol='±'
|
|
|
|
|
vcs_info
|
|
|
|
|
else
|
|
|
|
|
_prompt_giddie_symbol=')'
|
|
|
|
|
fi
|
|
|
|
|
vcs_info
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function prompt_giddie_setup {
|
|
|
|
@ -48,6 +49,7 @@ function prompt_giddie_setup {
|
|
|
|
|
|
|
|
|
|
# Set editor-info parameters.
|
|
|
|
|
zstyle ':prezto:module:editor:info:completing' format '%F{green}...%f'
|
|
|
|
|
zstyle ':prezto:module:editor:info:keymap:alternate' format '%F{yellow}--- COMMAND ---%f'
|
|
|
|
|
|
|
|
|
|
# Set vcs_info parameters.
|
|
|
|
|
zstyle ':vcs_info:*' enable git
|
|
|
|
@ -62,7 +64,7 @@ function prompt_giddie_setup {
|
|
|
|
|
PROMPT='%(?..%F{red}%B-> [%?]%b%f
|
|
|
|
|
)%F{magenta}%n%f@%F{yellow}%m%f|%F{green}${_prompt_giddie_pwd}%f${vcs_info_msg_0_}
|
|
|
|
|
%F{blue}${_prompt_giddie_symbol}%f '
|
|
|
|
|
RPROMPT=''
|
|
|
|
|
RPROMPT='${editor_info[keymap]}'
|
|
|
|
|
SPROMPT='zsh: correct %F{magenta}%R%f to %F{green}%r%f [nyae]? '
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|