Update ivabus.zsh-theme

This commit is contained in:
Ivan Bushchik 2022-09-26 19:27:03 +03:00 committed by GitHub
parent 875e2e0c38
commit fe1d46be82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,14 +2,14 @@
__zsh_prompt() {
local prompt_username
prompt_username="%n"
if [[ $UID == 0 || $EUID == 0 ]]; then
if [[ $UID == 0 || $EUID == 0 ]]; then # check if root for red colors for username
PROMPT="%{$fg[red]%}${prompt_username} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )"
else
PROMPT="%{$fg[green]%}${prompt_username} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )" # User/exit code arrow
PROMPT="%{$fg[green]%}${prompt_username} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )"
fi
PROMPT+='%{$fg_bold[blue]%}%(5~|%-1~/…/%3~|%4~)%{$reset_color%} ' # cwd
PROMPT+='$(git_prompt_info)' # Git status
if [[ $UID == 0 || $EUID == 0 ]]; then
if [[ $UID == 0 || $EUID == 0 ]]; then # again root and red colors but now for indicator
PROMPT+='%{$fg[red]%}# %{$reset_color%}'
else
PROMPT+='%{$fg[white]%}$ %{$reset_color%}'