From 9087f40720b78ceabb1470c934e8450cb31868bf Mon Sep 17 00:00:00 2001 From: har0ke Date: Sun, 5 Sep 2021 12:38:09 +0200 Subject: [PATCH] Show username and host if in sudo --- .oh-my-zsh/themes/oke.zsh-theme | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.oh-my-zsh/themes/oke.zsh-theme b/.oh-my-zsh/themes/oke.zsh-theme index 54ab4f7..efd5a81 100644 --- a/.oh-my-zsh/themes/oke.zsh-theme +++ b/.oh-my-zsh/themes/oke.zsh-theme @@ -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]%}"