blob: 6216765c9d8be0155598d73afa80380ff1b38f41 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# -*- mode: shell-script -*-
source_if_exists() {
local f=~/.zshenv
[[ -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
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
|