Browse Source

Update comments in themes

master
Sorin Ionescu 12 years ago
parent
commit
a9b6c84ea5
  1. 6
      modules/prompt/functions/prompt_minimal_setup
  2. 4
      modules/prompt/functions/prompt_nicoulaj_setup
  3. 6
      modules/prompt/functions/prompt_sorin_setup

6
modules/prompt/functions/prompt_minimal_setup

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

4
modules/prompt/functions/prompt_nicoulaj_setup

@ -25,7 +25,7 @@ function prompt_nicoulaj_setup {
unsetopt XTRACE KSH_ARRAYS unsetopt XTRACE KSH_ARRAYS
prompt_opts=(cr percent subst) prompt_opts=(cr percent subst)
# Load required modules. # Load required functions.
autoload -Uz add-zsh-hook autoload -Uz add-zsh-hook
autoload -Uz vcs_info autoload -Uz vcs_info
@ -42,7 +42,7 @@ function prompt_nicoulaj_setup {
# Set vcs_info parameters. # Set vcs_info parameters.
zstyle ':vcs_info:*' enable bzr git hg svn 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:*:*' unstagedstr '!'
zstyle ':vcs_info:*:*' stagedstr '+' zstyle ':vcs_info:*:*' stagedstr '+'
zstyle ':vcs_info:*:*' actionformats "%S" "%r/%s/%b %u%c (%a)" zstyle ':vcs_info:*:*' actionformats "%S" "%r/%s/%b %u%c (%a)"

6
modules/prompt/functions/prompt_sorin_setup

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

Loading…
Cancel
Save