prezto/runcoms/zshenv
Robin aac0c90c87 Don't override customized environments in subshells
Only set up environment for top-level shells, and allow it to be
inherited normally.

Top level shells are usually login shells, but can also be
non-interactive non-login shells in certain cases, such as when
executing an ssh remote command.
2013-11-23 15:16:44 -08:00

12 lines
225 B
Bash

#
# Defines environment variables.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Treat top-level shells as "login" shells.
if [[ $SHLVL == 1 && ! -o LOGIN ]]; then
source "${ZDOTDIR:-$HOME}/.zprofile"
fi