1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 23:08:00 +00:00

[Fix #277] Make the peepcode theme status symbol customizable

This commit is contained in:
Sorin Ionescu 2012-09-09 13:48:16 -04:00
parent fad7122a92
commit eb29987ce9

View File

@ -51,12 +51,38 @@ function prompt_peepcode_setup {
zstyle ':prezto:module:ruby' version ' %F{white}%v%f' zstyle ':prezto:module:ruby' version ' %F{white}%v%f'
# Define prompts. # Define prompts.
PROMPT=' PROMPT="
%~ %~
%(?.%F{green}☻%f.%F{red}☻%f) ' %(?.%F{green}${1:-☻ }%f.%F{red}${1:-☻ }%f) "
RPROMPT='${ruby_info[version]}${vcs_info_msg_0_}' RPROMPT='${ruby_info[version]}${vcs_info_msg_0_}'
} }
function prompt_peepcode_help {
cat <<EOH
This prompt's last command exit status symbol is customizable:
prompt peepcode [<symbol>]
If this option is not provided, the symbol defaults to ☻.
EOH
}
function prompt_peepcode_preview {
local +h PROMPT='%# '
local +h RPROMPT=''
local +h SPROMPT=''
if (( $# > 0 )); then
prompt_preview_theme 'peepcode' "$@"
else
prompt_preview_theme 'peepcode'
print
prompt_preview_theme 'peepcode' ""
print
prompt_preview_theme 'peepcode' "$"
fi
}
prompt_peepcode_setup "$@" prompt_peepcode_setup "$@"