From 70e254153d495703edb5108bed340e8871c934de Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Tue, 14 Apr 2015 23:24:49 +0200 Subject: zsh/prompt: use case --- zsh/prompt.zsh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/zsh/prompt.zsh b/zsh/prompt.zsh index 09f505e..f629be0 100644 --- a/zsh/prompt.zsh +++ b/zsh/prompt.zsh @@ -30,17 +30,21 @@ if (( UID == 0 )); then $bg[light_blue]%B ^_^ %b%k ' else - if [[ $HOST == "leeloo.kyriasis.com" ]]; then - PROMPT='$bg[black] $fg[white]%m%f %k$bg[white]$fg[black] %~ %f%k -$bg[light_blue]%B ^_^ %b %k' - - elif [[ $HOST == "theos.kyriasis.com" ]]; then + case $SHORTHOST in + "theos") PROMPT='$bg[light_pink] $fg[white]%m%f %k$bg[white]$fg[light_pink] %~ %f%k $bg[light_blue]%B ^_^ %b %k' + ;; - elif [[ $HOST == "lucifer.kyriasis.com" ]]; then + "lucifer") PROMPT='$bg[dark_gold] $fg[white]%m%f %k$bg[white]$fg[dark_gold] %~ %f%k $bg[light_blue]%B ^_^ %b %k' + ;; + + *) + PROMPT='$bg[black] $fg[white]%m%f %k$bg[white]$fg[black] %~ %f%k +$bg[light_blue]%B ^_^ %b %k' + ;; - fi + esac fi -- cgit v1.2.3-70-g09d2