From: Samir Benmendil Date: Thu, 15 Nov 2012 12:00:12 +0000 (+0100) Subject: change colour per hostname X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/1f791691da5a823bbab1eb167a801daf942b39cc?ds=sidebyside change colour per hostname --- diff --git a/zshrc b/zshrc index a181dbd..6f8f6a3 100644 --- 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