24 lines
478 B
Bash
24 lines
478 B
Bash
#
|
|
# Defines environment variables.
|
|
#
|
|
# Authors:
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
#
|
|
|
|
# Ensure that a non-login, non-interactive shell has a defined environment.
|
|
if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
|
|
source "${ZDOTDIR:-$HOME}/.zprofile"
|
|
fi
|
|
|
|
function add_to_path {
|
|
if [[ -d $1 ]]; then
|
|
export PATH="$1:$PATH"
|
|
fi
|
|
}
|
|
|
|
add_to_path "$HOME/bin"
|
|
add_to_path "$HOME/brew/sbin"
|
|
add_to_path "$HOME/brew/bin"
|
|
|
|
unset LC_CTYPE
|