mirror of
https://github.com/ivabus/ivabus-zsh-theme
synced 2024-12-04 22:15:06 +03:00
Remove stupid as f @
and add root indication
This commit is contained in:
parent
1911d61bc5
commit
8c924530d6
1 changed files with 11 additions and 3 deletions
|
@ -1,11 +1,19 @@
|
|||
# ivabus zsh prompt theme
|
||||
__zsh_prompt() {
|
||||
local prompt_username
|
||||
prompt_username="@%n"
|
||||
PROMPT="%{$fg[green]%}${prompt_username} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )" # User/exit code arrow
|
||||
prompt_username="%n"
|
||||
if [[ $UID == 0 || $EUID == 0 ]]; then
|
||||
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
|
||||
fi
|
||||
PROMPT+='%{$fg_bold[blue]%}%(5~|%-1~/…/%3~|%4~)%{$reset_color%} ' # cwd
|
||||
PROMPT+='$(git_prompt_info)' # Git status
|
||||
PROMPT+='%{$fg[white]%}$ %{$reset_color%}'
|
||||
if [[ $UID == 0 || $EUID == 0 ]]; then
|
||||
PROMPT+='%{$fg[red]%}# %{$reset_color%}'
|
||||
else
|
||||
PROMPT+='%{$fg[white]%}$ %{$reset_color%}'
|
||||
fi
|
||||
unset -f __zsh_prompt
|
||||
}
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}(%{$fg_bold[red]%}"
|
||||
|
|
Loading…
Reference in a new issue