From dc0ad3e4a003af64195629de74f2a9d4b2534f21 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 11 Jul 2009 20:24:51 +0200 Subject: new prompt --- .zsh/rc/15prompt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to '.zsh') diff --git a/.zsh/rc/15prompt b/.zsh/rc/15prompt index f462616..a897e19 100644 --- a/.zsh/rc/15prompt +++ b/.zsh/rc/15prompt @@ -34,9 +34,18 @@ parse_git_branch() { precmd () { # this has to be on the edge or you have some spaces in the prompt # if you have any workaround please tell -PROMPT="${fg_light_red}$USERNAME${fg_no_colour}@${fg_light_green}%m${fg_no_colour} \ -- ${fg_light_blue}%~${fg_no_colour} ${fg_purple}$(parse_git_branch)${fg_no_colour} -[${fg_cyan}%*${fg_no_colour}] ${fg_red}$EXITCODE${fg_no_colour}> " +if [[ $UID != 0 ]]; then + local username_color=$fg_blue +else + local username_color=$fg_red +fi +local host_color=$fg_light_green +local path_color=$fg_light_blue +local gitbranch_color=$fg_purple +local exitcode_color=$fg_red +PROMPT="${username_color}$USERNAME${fg_no_colour}@${host_color}%m${fg_no_colour}\ +:${path_color}%~${fg_no_colour} ${gitbranch_color}$(parse_git_branch)${fg_no_colour} +${exitcode_color}$EXITCODE${fg_no_colour}> " } ## Spelling prompt -- cgit v1.2.3-24-g4f1b