diff options
author | Alan Pearce | 2016-07-13 14:07:51 +0200 |
---|---|---|
committer | Alan Pearce | 2016-07-13 14:07:51 +0200 |
commit | 7f310bdc9950bd5b0ae18bba6967990a0d699c1c (patch) | |
tree | 82a27bf20ca8dae9cedc9082f860e03c645b2bde /tag-zsh | |
parent | c7882b51fa2bf967d7a357690ecc14e1958a162d (diff) | |
download | dotfiles-7f310bdc9950bd5b0ae18bba6967990a0d699c1c.tar.lz dotfiles-7f310bdc9950bd5b0ae18bba6967990a0d699c1c.tar.zst dotfiles-7f310bdc9950bd5b0ae18bba6967990a0d699c1c.zip |
zsh: Only build environment in top-level shell
Diffstat (limited to 'tag-zsh')
-rw-r--r-- | tag-zsh/config/zsh/zshenv | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tag-zsh/config/zsh/zshenv b/tag-zsh/config/zsh/zshenv index 3e8d1da..98050a0 100644 --- a/tag-zsh/config/zsh/zshenv +++ b/tag-zsh/config/zsh/zshenv @@ -1,11 +1,14 @@ -if [[ -f $ZDOTDIR/zshenv.local ]] +if [[ $SHLVL = 1 ]] then - . $ZDOTDIR/zshenv.local -fi + if [[ -f $ZDOTDIR/zshenv.local ]] + then + . $ZDOTDIR/zshenv.local + fi -ZPLUG_HOME=${ZPLUG_HOME:-~/projects/zplug} + ZPLUG_HOME=${ZPLUG_HOME:-~/projects/zplug} -if [[ -z $SSH_AUTH_SOCK ]] -then - export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket + if [[ -z $SSH_AUTH_SOCK ]] + then + export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket + fi fi |