blob: b2bd2c98bffd3edfd6ca5d11ea2b942732ea1e3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# -*- mode: shell-script -*-
source_if_exists() {
[[ -f ${${(%):-%x}:A:h:h}/$1 ]] && . ${${(%):-%x}:A:h:h}/$1 || return 0
}
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}/zsh/env
source_if_exists dotfiles-${DOMAIN}/zsh/env
source_if_exists dotfiles-${HOST}/zsh/env
|