From a3853ef5ae74f14617a59c9ce9af54059cb2a825 Mon Sep 17 00:00:00 2001 From: Ben O'Hara Date: Sat, 2 Jun 2012 23:51:03 +1000 Subject: [PATCH] host based prompt color --- modules/prompt/functions/prompt_solarized_setup | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/prompt/functions/prompt_solarized_setup b/modules/prompt/functions/prompt_solarized_setup index 60735ce7..35711c11 100644 --- a/modules/prompt/functions/prompt_solarized_setup +++ b/modules/prompt/functions/prompt_solarized_setup @@ -131,12 +131,16 @@ function prompt_solarized_setup { zstyle ':vcs_info:*:prompt:*' formats "${fmt_branch}" zstyle ':vcs_info:*:prompt:*' nvcsformats "" + zstyle -a ':omz:module:prompt:solarized' $HOST '_prompt_host' + + prompt_host=$"prompt_$_prompt_host" + zstyle -b ':omz:module:prompt:solarized' dark '_prompt_dark' if is-true "${_prompt_dark}"; then - PROMPT="%(!.$prompt_red.$prompt_green)%n%f$prompt_base1 at $prompt_green%m%f$prompt_base1 in $prompt_base01%~%f"'${vcs_info_msg_0_}'" + PROMPT="%(!.$prompt_red.$prompt_green)%n%f$prompt_base1 at $prompt_host%m%f$prompt_base1 in $prompt_base01%~%f"'${vcs_info_msg_0_}'" "'$(virtualenv_info)'"$prompt_base1 %# $prompt_base0" else - PROMPT="%(!.$prompt_red.$prompt_green)%n%f$prompt_base01 at $prompt_green%m%f$prompt_base01 in $prompt_base1%~%f"'${vcs_info_msg_0_}'" + PROMPT="%(!.$prompt_red.$prompt_green)%n%f$prompt_base01 at $prompt_host%m%f$prompt_base01 in $prompt_base1%~%f"'${vcs_info_msg_0_}'" "'$(virtualenv_info)'"$prompt_base01 %# $prompt_base00" fi }