Show username and host if in sudo
This commit is contained in:
parent
7152520c44
commit
9087f40720
@ -3,13 +3,10 @@ PROMPT=""
|
|||||||
|
|
||||||
PROMPT+="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
|
PROMPT+="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
|
||||||
|
|
||||||
if [[ "$(env | grep SSH_)" != "" ]]; then
|
if [[ "$(env | grep SSH_)" != "" || "$(env | grep SUDO_)" != "" ]]; then
|
||||||
PROMPT+="%{$fg[grey]%}%m:"
|
PROMPT+="%{$FG[007]%}%n@%m:"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PROMPT+='%{$fg[cyan]%}%c%{$reset_color%}$(git_prompt_info) '
|
PROMPT+='%{$fg[cyan]%}%c%{$reset_color%}$(git_prompt_info) '
|
||||||
|
|
||||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}"
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user