]> git.rmz.io Git - dotfiles.git/commitdiff
change colour per hostname
authorSamir Benmendil <samir.benmendil@gmail.com>
Thu, 15 Nov 2012 12:00:12 +0000 (13:00 +0100)
committerSamir Benmendil <samir.benmendil@gmail.com>
Thu, 15 Nov 2012 12:00:12 +0000 (13:00 +0100)
zshrc

diff --git a/zshrc b/zshrc
index a181dbd5f89195985026376a1cf92f214fb2322c..6f8f6a3a12de5d57e830e196498abce22ad1e026 100644 (file)
--- a/zshrc
+++ b/zshrc
@@ -42,7 +42,9 @@ autoload -U ${fpath[1]}/*(:t)   # loads all functions in the first element of fp
 
 # set up prompt
 autoload -U colors && colors
-PROMPT="%(?..%{$fg_bold[white]%}[%?])%{$reset_color%}[%D{%k:%M} %n@%{$fg[green]%}%m%{$reset_color%}]%# "
+[[ $(hostname) == "tardis" ]] && hostcolor=red
+[[ $(hostname) == "shada" ]]  && hostcolor=green
+PROMPT="%(?..%{$fg_bold[white]%}[%?])%{$reset_color%}[%D{%k:%M} %n@%{$fg[$hostcolor]%}%m%{$reset_color%}]%# "
 RPROMPT="%{$fg[green]%}%~%{$reset_color%}"
 
 # make cd act like pushd