diff --git a/README.md b/README.md index 073015d..d43ecfa 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,14 @@ crater's zsh config Installation: ------------- -From the checked out repo: +Set the `ZDOTDIR` environment variable to the directory of this repo. Note that +this environment variable must be set before the user configuration files of zsh +are read. + +One way to do this is to set it in the global zsh configuration in +`/etc/zsh/zshenv`, e.g. to use the XDG basedir spec with this repo at +`~/.config/zsh`: + ``` -ln -s $PWD/zshenv $HOME/.zshenv +export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}"/zsh ``` -The zshenv file sets the location to the rest of the config (`$ZDOTDIR`) -automatically, based on the link target. diff --git a/zshenv b/zshenv index 95bbe34..d7b5b4b 100755 --- a/zshenv +++ b/zshenv @@ -1,5 +1,3 @@ -export ZDOTDIR="${$(readlink $HOME/.zshenv):h:a}" - exists() { command -v "$@" >/dev/null } function(){ local i