From b19551e8b4c78f4af63fb9e27bedb67a860f72dc Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Thu, 11 Oct 2018 12:56:34 +0300 Subject: [PATCH] zshrc: elite2 green for user, elite2 red for root --- rc/zshrc | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/rc/zshrc b/rc/zshrc index d0825d19..fb306726 100644 --- a/rc/zshrc +++ b/rc/zshrc @@ -49,19 +49,14 @@ setopt SHARE_HISTORY # Set up the prompt autoload -Uz promptinit -# Green for normal user and red for root and show exit status -# if it's not 0. Thank you nyuszika7h +# Green for normal user and red for root promptinit -#autoload -Uz vcs_info -autoload -Uz colors && colors -setopt PROMPT_SUBST -#zstyle ':vcs_info:*' check-for-changes true -#zstyle ':vcs_info:*' enable git svn bzr hg -#zstyle ':vcs_info:*' formats '%b ' -#precmd() { vcs_info } -PS1="%B%(!.%F{red}.%F{green})%n@%m %~ -%# %(?..%B%?%b )%f%b" +if [ $USER = "root" ]; then + prompt elite2 red +else + prompt elite2 green +fi # Use emacs keybindings even if our EDITOR is set to vi bindkey -e