From 8f292a08a97b77142b85a98633ce9c1a5101ace4 Mon Sep 17 00:00:00 2001 From: Steve Losh Date: Wed, 18 Aug 2010 03:59:36 -0400 Subject: [PATCH] themes/prose: add .box-name support --- themes/prose.zsh-theme | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/themes/prose.zsh-theme b/themes/prose.zsh-theme index 74c59c071..d64a7ab67 100644 --- a/themes/prose.zsh-theme +++ b/themes/prose.zsh-theme @@ -16,8 +16,12 @@ function hg_prompt_info { patches: >" 2>/dev/null } +function box_name { + [ -f ~/.box-name ] && cat ~/.box-name || hostname -s +} + PROMPT=' -%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) +%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}$(box_name)%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) $(virtualenv_info)$(prompt_char) ' ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"