From 91cf3ef84667540fc1e3c5de7a40d822ba755a63 Mon Sep 17 00:00:00 2001 From: Bodaniel Jeanes Date: Sun, 27 Jun 2010 05:31:31 +0000 Subject: [PATCH] Prompt is blue if connected through SSH --- zsh/theme | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zsh/theme b/zsh/theme index 1f60f23..a00ef3c 100644 --- a/zsh/theme +++ b/zsh/theme @@ -2,7 +2,11 @@ function prompt_color() { if [ "$USER" = "root" ]; then echo "red" else - echo "green" + if [ -n "$SSH_TTY" ]; then + echo "blue" + else + echo "green" + fi fi } @@ -12,4 +16,4 @@ ZSH_THEME_VCS_PROMPT_SUFFIX="›%{$reset_color%}" ZSH_THEME_VCS_PROMPT_FORMAT="${ZSH_THEME_VCS_PROMPT_PREFIX}%b:%h${ZSH_THEME_VCS_PROMPT_SUFFIX}" PS1='%{$fg[blue]%}$(prompt_pwd)%{$reset_color%} %{$fg[$(prompt_color)]%}♪%{$reset_color%} ' -RPS1='$(${VCPROMPT} -f ${ZSH_THEME_VCS_PROMPT_FORMAT})' \ No newline at end of file +RPS1='$(${VCPROMPT} -f ${ZSH_THEME_VCS_PROMPT_FORMAT})'