mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
updated theme w/last-command indicator
This commit is contained in:
parent
774495369e
commit
27fd1bd6ac
1 changed files with 7 additions and 5 deletions
|
|
@ -8,14 +8,16 @@ function smh_rvm_info {
|
|||
echo "%{$fg[magenta]%}$(rvm_prompt_info)%{$reset_color%}"
|
||||
}
|
||||
|
||||
function prompt_char {
|
||||
if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi
|
||||
function root_warning {
|
||||
if [ $UID -eq 0 ]; then echo "%{$fg[red]%}☠%{$reset_color%} "; fi
|
||||
}
|
||||
|
||||
PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%}
|
||||
)
|
||||
# Save a smiley to a local variable if the last command exited with success.
|
||||
local smiley="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%})"
|
||||
|
||||
PROMPT='
|
||||
%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%} [$(smh_rvm_info)$(git_prompt_info)]
|
||||
%_ $(prompt_char) '
|
||||
%_${smiley} $(prompt_char) '
|
||||
|
||||
RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue