summaryrefslogtreecommitdiff
path: root/zsh/env
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/env')
-rw-r--r--zsh/env2
1 files changed, 1 insertions, 1 deletions
diff --git a/zsh/env b/zsh/env
index e905bbb..5df08b1 100644
--- a/zsh/env
+++ b/zsh/env
@@ -8,9 +8,9 @@ source_if_exists() {
[[ -f $(dotfiles_root)/$1 ]] && . $(dotfiles_root)/$1 || return 0
}
-[[ ${HOST} =~ \\. ]] && export DOMAIN=${(j:.:)${(s:.:)HOST}[-2,-1]:l}
export HOST=${HOST:l}
export HOST_SHORT=${${(%):-%m}:l}
+export DOMAIN=${${${(%):-%M}#${HOST_SHORT}.}:l}
case ${OSTYPE} in
darwin*) export UNAME=darwin ;;
linux*) export UNAME=linux ;;