diff options
Diffstat (limited to 'zsh/env')
| -rw-r--r-- | zsh/env | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,7 +1,11 @@ # -*- mode: shell-script -*- +dotfiles_root() { + echo ${${(%):-%x}:A:h:h} +} + source_if_exists() { - [[ -f ${${(%):-%x}:A:h:h}/$1 ]] && . ${${(%):-%x}:A:h:h}/$1 || return 0 + [[ -f $(dotfiles_root)/$1 ]] && . $(dotfiles_root)/$1 || return 0 } export DOMAIN=${$(cut -d. -f2- -s <<<${HOST}):l} |
