summaryrefslogtreecommitdiff
path: root/zsh/env
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2019-12-21 22:42:39 +0000
committerGrégoire Duchêne <gduchene@awhk.org>2019-12-21 22:42:39 +0000
commitc9d29d439ca341dd24dd05aede1d94baf13fc3ff (patch)
tree3e66c815f693a5150fe02c2f4f9dcc998d3cd4a8 /zsh/env
parent2fcc816c333862c64b768ce3eec3bc41d7ad7471 (diff)
Add zsh configuration
Diffstat (limited to 'zsh/env')
-rw-r--r--zsh/env16
1 files changed, 16 insertions, 0 deletions
diff --git a/zsh/env b/zsh/env
new file mode 100644
index 0000000..852686f
--- /dev/null
+++ b/zsh/env
@@ -0,0 +1,16 @@
+# -*- mode: shell-script -*-
+
+source_if_exists() {
+ local f=~/.zshenv
+ [[ -f ${f:A:h:h}/$1 ]] && . ${f:A:h:h}/$1 || return 0
+}
+
+export UNAME=$(uname)
+export LC_ALL=en_US.UTF-8
+
+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