Skip to content
Browse files

Add support to specify a different color for each host

  • Loading branch information...
1 parent 140a9d9 commit da5a4f48f9bfd783737257701e9aefb67cf04569 @ErebusBat committed Mar 5, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 themes/batbat.zsh-theme
View
10 themes/batbat.zsh-theme
@@ -2,7 +2,15 @@
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
-local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
+#Build user@host string
+local user_host="$terminfo[bold]$fg[green]%n" # user
+user_host="$user_host$FG[238]@" # @
+if [[ -f ~/.zsh-host-color ]]
+then local host_color=`cat ~/.zsh-host-color`
+else local host_color=010 # 010 == $fg[green]
+fi
+user_host="$user_host$FG[$host_color]%m$reset_color" # host
+
local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}'
local git_branch='$(git_prompt_info)%{$reset_color%}'

0 comments on commit da5a4f4

Please sign in to comment.
Something went wrong with that request. Please try again.