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