mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 23:08:00 +00:00
[prompt_sorin] Use ✘ and show return value for non-0 rtrns (#1460)
If you do not want it to show the return code, you can set: `zstyle ':prezto:module:prompt' show-return-val false`
This commit is contained in:
parent
808d9d3579
commit
2cfd366ba6
@ -129,7 +129,12 @@ function prompt_sorin_setup {
|
|||||||
zstyle ':prezto:module:git:info:keys' format \
|
zstyle ':prezto:module:git:info:keys' format \
|
||||||
'status' '%b %p %c:%s%A%B%S%a%d%m%r%U%u'
|
'status' '%b %p %c:%s%A%B%S%a%d%m%r%U%u'
|
||||||
|
|
||||||
|
# Set up non-zero return value display
|
||||||
|
local show_return="✘ "
|
||||||
|
# Default is to show the return value
|
||||||
|
if zstyle -T ':prezto:module:prompt' show-return-val; then
|
||||||
|
show_return+='%? '
|
||||||
|
fi
|
||||||
# Set python-info format
|
# Set python-info format
|
||||||
zstyle ':prezto:module:python:info:virtualenv' format '%f%F{3}(%v)%F{7} '
|
zstyle ':prezto:module:python:info:virtualenv' format '%f%F{3}(%v)%F{7} '
|
||||||
|
|
||||||
@ -143,7 +148,9 @@ function prompt_sorin_setup {
|
|||||||
|
|
||||||
# Define prompts.
|
# Define prompts.
|
||||||
PROMPT='${SSH_TTY:+"%F{9}%n%f%F{7}@%f%F{3}%m%f "}%F{4}${_prompt_sorin_pwd}%(!. %B%F{1}#%f%b.)${editor_info[keymap]} '
|
PROMPT='${SSH_TTY:+"%F{9}%n%f%F{7}@%f%F{3}%m%f "}%F{4}${_prompt_sorin_pwd}%(!. %B%F{1}#%f%b.)${editor_info[keymap]} '
|
||||||
RPROMPT='$python_info[virtualenv]${editor_info[overwrite]}%(?:: %F{1}⏎%f)${VIM:+" %B%F{6}V%f%b"}${_prompt_sorin_git}'
|
RPROMPT='$python_info[virtualenv]${editor_info[overwrite]}%(?:: %F{1}'
|
||||||
|
RPROMPT+=${show_return}
|
||||||
|
RPROMPT+='%f)${VIM:+" %B%F{6}V%f%b"}${_prompt_sorin_git}'
|
||||||
SPROMPT='zsh: correct %F{1}%R%f to %F{2}%r%f [nyae]? '
|
SPROMPT='zsh: correct %F{1}%R%f to %F{2}%r%f [nyae]? '
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user