mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
moved cmd result to prompt from rprompt
This commit is contained in:
parent
09dd52af81
commit
f6b1e7cdc9
1 changed files with 7 additions and 5 deletions
|
|
@ -39,7 +39,12 @@ else
|
||||||
shell_level="%{$fg[cyan]%}(%{$fg[red]%}$[${SHLVL} - 1]%{$fg[cyan]%})%{$reset_color%}"
|
shell_level="%{$fg[cyan]%}(%{$fg[red]%}$[${SHLVL} - 1]%{$fg[cyan]%})%{$reset_color%}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PROMPT='%{$fg[cyan]%}[${user_host} %{$fg[yellow]%}%~%{$fg[cyan]%}]$(jobs_prompt_info)${shell_level} ${prompt_char} '
|
# setup command result indicator
|
||||||
|
CMDRESULT="%(?,,%{$fg[red]%}[%?]%{$reset_color%})"
|
||||||
|
|
||||||
|
# Put it all together
|
||||||
|
PROMPT='${CMDRESULT}%{$fg[cyan]%}[${user_host} %{$fg[yellow]%}%~%{$fg[cyan]%}]$(jobs_prompt_info)${shell_level}${prompt_char} '
|
||||||
|
|
||||||
|
|
||||||
# Setup vi mode indicator
|
# Setup vi mode indicator
|
||||||
MODE_INDICATOR="%{$fg_bold[yellow]%}<N>%{$reset_color%}"
|
MODE_INDICATOR="%{$fg_bold[yellow]%}<N>%{$reset_color%}"
|
||||||
|
|
@ -50,10 +55,7 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[red]%}⚡%{$reset_color%}"
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[red]%}⚡%{$reset_color%}"
|
||||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
||||||
|
|
||||||
# setup command result indicator
|
|
||||||
CMDRESULT="%(?, ,%{$fg[red]%}[$?]%{$reset_color%})"
|
|
||||||
|
|
||||||
# setup right prompt
|
# setup right prompt
|
||||||
RPROMPT='$(git_prompt_info)${CMDRESULT}$(vi_mode_prompt_info)'
|
RPROMPT='$(git_prompt_info)$(vi_mode_prompt_info)'
|
||||||
|
|
||||||
# vim: set ft=zsh
|
# vim: set ft=zsh
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue