Browse Source

Add ruby-info to smiley theme

master
Sorin Ionescu 11 years ago
parent
commit
c2d62c3b47
  1. 10
      modules/prompt/functions/prompt_smiley_setup

10
modules/prompt/functions/prompt_smiley_setup

@ -27,6 +27,11 @@ function prompt_smiley_precmd {
if (( $+functions[python-info] )); then if (( $+functions[python-info] )); then
python-info python-info
fi fi
# Get Ruby version information.
if (( $+functions[ruby-info] )); then
ruby-info
fi
} }
function prompt_smiley_setup { function prompt_smiley_setup {
@ -42,6 +47,9 @@ function prompt_smiley_setup {
# Set python-info parameters. # Set python-info parameters.
zstyle ':prezto:module:python:info:virtualenv' format '%F{yellow}[%v]%f ' 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. # Set git-info parameters.
zstyle ':prezto:module:git:info' verbose 'yes' zstyle ':prezto:module:git:info' verbose 'yes'
zstyle ':prezto:module:git:info:branch' format '%F{blue}%b%f' 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)' zstyle ':prezto:module:git:info:keys' format 'prompt' '(%b%D)'
# Define prompts. # 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"}' RPROMPT='${editor_info[overwrite]}${VIM:+" %B%F{green}V%f%b"}'
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