From 81cd933c8e42928072d27274fd706d35b3ff7a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Conde=20G=C3=B3mez?= Date: Mon, 6 Feb 2012 23:14:53 +0100 Subject: [PATCH] Updated gentoo-advanced.zsh-theme to include root prompt. --- themes/gentoo-advanced.zsh-theme | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/themes/gentoo-advanced.zsh-theme b/themes/gentoo-advanced.zsh-theme index b221e1a93..6808dc388 100644 --- a/themes/gentoo-advanced.zsh-theme +++ b/themes/gentoo-advanced.zsh-theme @@ -2,7 +2,7 @@ # FILE: gentoo-advanced.zsh-theme # DESCRIPTION: Gentoo's bashrc clone theme for oh-my-zsh. # AUTHOR: Sergio Conde Gómez (skgsergio@gmail.com) -# VERSION: 1.0.0 +# VERSION: 1.1 # ------------------------------------------------------------------------------ # Return Code @@ -32,5 +32,9 @@ ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$fg[white]%}[%{$fg[yellow]%}" ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$fg[white]%}]" # Prompt format -PROMPT='%{$fg_bold[green]%}%n@%m%{$fg[white]%} %{$fg_bold[blue]%}%~%u%{$reset_color%} %{$fg_bold[blue]%}$%{$reset_color%} ' -RPROMPT='${return_code}%{$fg_bold[green]%}$(current_branch)$(parse_git_dirty)$(git_prompt_ahead)$(git_prompt_short_sha)$(git_prompt_status)%{$reset_color%}' \ No newline at end of file +if [[ $UID -eq 0 ]]; then + PROMPT='%{$fg_bold[red]%}%m%{$fg[white]%} %{$fg_bold[blue]%}%~%u%{$reset_color%} %{$fg_bold[blue]%}#%{$reset_color%} ' +else + PROMPT='%{$fg_bold[green]%}%n@%m%{$fg[white]%} %{$fg_bold[blue]%}%~%u%{$reset_color%} %{$fg_bold[blue]%}$%{$reset_color%} ' +fi +RPROMPT='${return_code}%{$fg_bold[green]%}$(current_branch)$(parse_git_dirty)$(git_prompt_ahead)$(git_prompt_short_sha)$(git_prompt_status)%{$reset_color%}'