Permalink
Browse files

Add different color for host

  • Loading branch information...
1 parent 387b46d commit e0689b5d996fd9c6dc29784a5c90dbdb6ff48464 @nevar committed Aug 1, 2012
Showing with 16 additions and 2 deletions.
  1. +16 −2 .zshrc
View
18 .zshrc
@@ -35,8 +35,22 @@ zmodload zsh/complist
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
-PROMPT='%{$fg[yellow]%U%}%n@%m%{%u${reset_color}%}:%{$fg[blue]%}%~\
-%{$fg[red]%}\$ %{${reset_color}%}'
+case `hostname` in
+ hell)
+ MY_HOST='%{$fg[yellow]%U%}%m%{%u${reset_color}'
+ ;;
+ dev-mx)
+ MY_HOST='%{$fg[green]%U%}%m%{%u${reset_color}'
+ ;;
+ dev-webnode1)
+ MY_HOST='%{$fg[blue]%U%}%m%{%u${reset_color}'
+ ;;
+ *)
+ MY_HOST='%{$fg[white]%U%}%m%{%u${reset_color}'
+ ;;
+esac
+USER='%{$fg[yellow]%U%}%n%{%u${reset_color}'
+PROMPT="$USER@$MY_HOST:%{$fg[blue]%}%~%{$fg[red]%}\$ %{${reset_color}%}"
# enable color support of ls and also add handy aliases
alias ls='ls --color=auto'

0 comments on commit e0689b5

Please sign in to comment.