Show username and host if in sudo

This commit is contained in:
har0ke 2021-09-05 12:38:09 +02:00
parent 7152520c44
commit 9087f40720

View File

@ -3,13 +3,10 @@ PROMPT=""
PROMPT+="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
if [[ "$(env | grep SSH_)" != "" ]]; then
PROMPT+="%{$fg[grey]%}%m:"
if [[ "$(env | grep SSH_)" != "" || "$(env | grep SUDO_)" != "" ]]; then
PROMPT+="%{$FG[007]%}%n@%m:"
fi
PROMPT+='%{$fg[cyan]%}%c%{$reset_color%}$(git_prompt_info) '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}"