From 43e903bc4c014873119441eacaf586f1dcdccf54 Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Wed, 8 Jan 2020 00:10:32 +0000 Subject: Get the dotfiles directory without a known path --- zsh/env | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'zsh/env') diff --git a/zsh/env b/zsh/env index 6216765..0b14d38 100644 --- a/zsh/env +++ b/zsh/env @@ -1,8 +1,7 @@ # -*- mode: shell-script -*- source_if_exists() { - local f=~/.zshenv - [[ -f ${f:A:h:h}/$1 ]] && . ${f:A:h:h}/$1 || return 0 + [[ -f ${${(%):-%x}:A:h:h}/$1 ]] && . ${${(%):-%x}:A:h:h}/$1 || return 0 } export DOMAIN=$(cut -d. -f2- -s <<<${HOST}) -- cgit v1.2.3-70-g09d2