summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zsh/env7
1 files changed, 5 insertions, 2 deletions
diff --git a/zsh/env b/zsh/env
index e150338..74d96cd 100644
--- a/zsh/env
+++ b/zsh/env
@@ -8,9 +8,12 @@ source_if_exists() {
[[ -f $(dotfiles_root)/$1 ]] && . $(dotfiles_root)/$1 || return 0
}
-export DOMAIN=${$(cut -d. -f2- -s <<<${HOST}):l}
+[[ ${HOST} =~ \\. ]] && export DOMAIN=${(j:.:)${(s:.:)HOST}[-2,-1]:l}
export HOST=${HOST:l}
-export UNAME=${$(uname):l}
+case ${OSTYPE} in
+ darwin*) export UNAME=darwin ;;
+ linux*) export UNAME=linux ;;
+esac
setopt EXTENDED_GLOB
setopt REMATCH_PCRE