summaryrefslogtreecommitdiff
path: root/zsh/env
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2020-05-24 23:29:15 +0100
committerGrégoire Duchêne <gduchene@awhk.org>2020-05-24 23:58:46 +0100
commitcabd13b69566002210c0b2988af849520c4a6d21 (patch)
treee580de57392dab4f74d3b5a84765d8f6db032acd /zsh/env
parentf4857f1db71aed11a2ec4fabb21a31e72bb973c7 (diff)
zsh: Use :l when defining DOMAIN, HOST, and UNAME
Diffstat (limited to 'zsh/env')
-rw-r--r--zsh/env11
1 files changed, 6 insertions, 5 deletions
diff --git a/zsh/env b/zsh/env
index 5090142..b2bd2c9 100644
--- a/zsh/env
+++ b/zsh/env
@@ -4,12 +4,13 @@ source_if_exists() {
[[ -f ${${(%):-%x}:A:h:h}/$1 ]] && . ${${(%):-%x}:A:h:h}/$1 || return 0
}
-export DOMAIN=$(cut -d. -f2- -s <<<${HOST})
-export UNAME=$(uname)
+export DOMAIN=${$(cut -d. -f2- -s <<<${HOST}):l}
+export HOST=${HOST:l}
+export UNAME=${$(uname):l}
setopt EXTENDED_GLOB
setopt REMATCH_PCRE
-source_if_exists dotfiles-${UNAME:l}/zsh/env
-source_if_exists dotfiles-${DOMAIN:l}/zsh/env
-source_if_exists dotfiles-${HOST:l}/zsh/env
+source_if_exists dotfiles-${UNAME}/zsh/env
+source_if_exists dotfiles-${DOMAIN}/zsh/env
+source_if_exists dotfiles-${HOST}/zsh/env