Add ruby-info to smiley theme

This commit is contained in:
Sorin Ionescu 2014-03-10 16:48:47 -04:00
parent 03336db523
commit c2d62c3b47

View file

@ -27,6 +27,11 @@ function prompt_smiley_precmd {
if (( $+functions[python-info] )); then
python-info
fi
# Get Ruby version information.
if (( $+functions[ruby-info] )); then
ruby-info
fi
}
function prompt_smiley_setup {
@ -42,6 +47,9 @@ function prompt_smiley_setup {
# Set python-info parameters.
zstyle ':prezto:module:python:info:virtualenv' format '%F{yellow}[%v]%f '
# Set ruby-info parameters.
zstyle ':prezto:module:ruby:info:version' format '%F{yellow}[%v]%f '
# Set git-info parameters.
zstyle ':prezto:module:git:info' verbose 'yes'
zstyle ':prezto:module:git:info:branch' format '%F{blue}%b%f'
@ -49,7 +57,7 @@ function prompt_smiley_setup {
zstyle ':prezto:module:git:info:keys' format 'prompt' '(%b%D)'
# Define prompts.
PROMPT='$python_info[virtualenv]${git_info[prompt]} %B%c%b %(?:%F{green}ツ%f:%F{red}✖%f) '
PROMPT='$python_info[virtualenv]$ruby_info[version]${git_info[prompt]} %B%c%b %(?:%F{green}ツ%f:%F{red}✖%f) '
RPROMPT='${editor_info[overwrite]}${VIM:+" %B%F{green}V%f%b"}'
SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? '
}