From 4856d16e33a0f1fc7fae61b6a3a1910666af62f9 Mon Sep 17 00:00:00 2001 From: Nicolas McCurdy Date: Mon, 26 Mar 2012 03:17:49 -0400 Subject: [PATCH] simplyblue: display the hostname when the computer is accessed via ssh --- themes/simplyblue.zsh-theme | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/themes/simplyblue.zsh-theme b/themes/simplyblue.zsh-theme index fe4490e08..24e64b98a 100644 --- a/themes/simplyblue.zsh-theme +++ b/themes/simplyblue.zsh-theme @@ -1,6 +1,12 @@ -PROMPT='%{$fg_bold[blue]%}%~ $(git_prompt_info)%{$fg_bold[yellow]%}➜ %{$reset_color%}' +PROMPT='$(ssh_connection)%{$fg_bold[blue]%}%~ $(git_prompt_info)%{$fg_bold[yellow]%}➜ %{$reset_color%}' RPROMPT='%{$fg_bold[blue]%}%T%{$reset_color%}' +function ssh_connection() { + if [[ -n $SSH_CONNECTION ]]; then + echo "%{$fg_bold[red]%}$(hostname) " + fi +} + ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}"