summaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2020-01-06 21:50:13 +0000
committerGrégoire Duchêne <gduchene@awhk.org>2020-01-06 21:53:08 +0000
commit4b32447683beeea38444b198a384a6adf99721cf (patch)
tree895dda730e2c78e5796e64f904814222f0772efa /zsh
parent8ec6e87077dbed6f975d95bbd27374f9dde9e4eb (diff)
Export DOMAIN on both Linux and macOS
Also, use -s with cut so that DOMAIN will be empty if no domain is set.
Diffstat (limited to 'zsh')
-rw-r--r--zsh/env1
1 files changed, 1 insertions, 0 deletions
diff --git a/zsh/env b/zsh/env
index 852686f..6216765 100644
--- a/zsh/env
+++ b/zsh/env
@@ -5,6 +5,7 @@ source_if_exists() {
[[ -f ${f:A:h:h}/$1 ]] && . ${f:A:h:h}/$1 || return 0
}
+export DOMAIN=$(cut -d. -f2- -s <<<${HOST})
export UNAME=$(uname)
export LC_ALL=en_US.UTF-8