Update comments in themes

This commit is contained in:
Sorin Ionescu 2012-08-06 16:52:38 -04:00
parent 7bb6d588d7
commit a9b6c84ea5
3 changed files with 12 additions and 4 deletions

View File

@ -7,7 +7,7 @@
#
function +vi-git-status() {
# Untracked files.
# Check for untracked files or updated submodules since vcs_info does not.
if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
hook_com[unstaged]='%F{red}●%f'
fi
@ -22,11 +22,14 @@ function prompt_minimal_setup {
unsetopt XTRACE KSH_ARRAYS
prompt_opts=(cr percent subst)
# Load required functions.
autoload -Uz add-zsh-hook
autoload -Uz vcs_info
# Add hook for calling vcs_info before each command.
add-zsh-hook precmd prompt_minimal_precmd
# Set vcs_info parameters.
zstyle ':vcs_info:*' enable bzr git hg svn
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' stagedstr '%F{green}●%f'
@ -36,6 +39,7 @@ function prompt_minimal_setup {
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b|%F{cyan}%r%f'
zstyle ':vcs_info:git*+set-message:*' hooks git-status
# Define prompts.
PROMPT='%2~${vcs_info_msg_0_} » '
}

View File

@ -25,7 +25,7 @@ function prompt_nicoulaj_setup {
unsetopt XTRACE KSH_ARRAYS
prompt_opts=(cr percent subst)
# Load required modules.
# Load required functions.
autoload -Uz add-zsh-hook
autoload -Uz vcs_info
@ -42,7 +42,7 @@ function prompt_nicoulaj_setup {
# Set vcs_info parameters.
zstyle ':vcs_info:*' enable bzr git hg svn
zstyle ':vcs_info:*:*' check-for-changes true # Can be slow on big repos.
zstyle ':vcs_info:*:*' check-for-changes true
zstyle ':vcs_info:*:*' unstagedstr '!'
zstyle ':vcs_info:*:*' stagedstr '+'
zstyle ':vcs_info:*:*' actionformats "%S" "%r/%s/%b %u%c (%a)"

View File

@ -1,5 +1,5 @@
#
# A simple theme that only shows relevant information.
# A simple theme that displays relevant, contextual information.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
@ -22,7 +22,10 @@ function prompt_sorin_setup {
unsetopt XTRACE KSH_ARRAYS
prompt_opts=(cr percent subst)
# Load required functions.
autoload -Uz add-zsh-hook
# Add hook for calling git-info before each command.
add-zsh-hook precmd prompt_sorin_precmd
zstyle ':omz:module:editor' completing '%B%F{red}...%f%b'
@ -45,6 +48,7 @@ function prompt_sorin_setup {
'prompt' ' %F{blue}git%f$(coalesce "%b" "%p" "%c")%s' \
'rprompt' '%A%B%S%a%d%m%r%U%u'
# Define prompts.
PROMPT='%F{cyan}%1~%f${git_info:+${(e)git_info[prompt]}} %(!.%B%F{red}#%f%b.%B%F{green}%f%b) '
RPROMPT='${editor_info[keymap]}${editor_info[overwrite]}%(?:: %F{red}⏎%f)${VIM:+" %B%F{green}V%f%b"}${git_info[rprompt]}'
SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? '