2012-04-16 12:15:30 -07:00
|
|
|
# .env
|
|
|
|
# vim: ft=zsh
|
|
|
|
#
|
2012-07-20 09:41:48 -07:00
|
|
|
# Environment settings for bash and derivatives. The env scripts are sources by
|
|
|
|
# Zsh for every shell, even the non-interactive ones, so this needs to be small
|
|
|
|
# and quick. Any configuration that will only be used for interactive sessions
|
|
|
|
# should be in the rc scripts.
|
2012-04-16 12:15:30 -07:00
|
|
|
#
|
|
|
|
# Eryn Wells <eryn@erynwells.me>
|
|
|
|
|
2012-08-07 11:19:43 -07:00
|
|
|
[ -e $HOME/.shell-functions ] && source $HOME/.shell-functions
|
|
|
|
|
2012-04-16 12:15:30 -07:00
|
|
|
export SYS=`uname -s | tr A-Z a-z`
|
2012-08-07 11:19:43 -07:00
|
|
|
# Set this to a non-zero integer to see startup messages
|
2013-08-07 22:58:48 -07:00
|
|
|
export NOISY=10
|
2012-04-16 12:15:30 -07:00
|
|
|
|
2012-11-29 15:18:57 -08:00
|
|
|
print_heading -l 1 'Initializing environment'
|
|
|
|
|
2012-07-20 09:41:48 -07:00
|
|
|
PAGER="less"
|
|
|
|
MANPAGER=$PAGER
|
|
|
|
EDITOR="vim"
|
|
|
|
VISUAL=$EDITOR
|
|
|
|
LESSHISTFILE="-"
|
|
|
|
GREP_OPTIONS="--color=auto"
|
|
|
|
GREP_COLOR="1;32"
|
|
|
|
|
|
|
|
export PAGER MANPAGER \
|
|
|
|
EDITOR VISUAL \
|
|
|
|
LESSHISTFILE \
|
|
|
|
GREP_OPTIONS GREP_COLOR
|
|
|
|
|
2012-04-16 12:15:30 -07:00
|
|
|
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
|
2012-07-20 09:41:48 -07:00
|
|
|
# NOTE: These prepended to $PATH in reverse order, so $HOME/bin will end up
|
|
|
|
# being the first path component.
|
2013-08-04 17:13:40 -07:00
|
|
|
[[ -d /usr/X11/bin ]] && PATH=$PATH:/usr/X11/bin
|
|
|
|
[[ -d /opt/local/bin ]] && PATH=/opt/local/bin:$PATH
|
|
|
|
[[ -d $HOME/.local/bin ]] && PATH=$HOME/.local/bin:$PATH
|
|
|
|
[[ -d $HOME/bin ]] && PATH=$HOME/bin:$PATH
|
2012-07-20 09:41:48 -07:00
|
|
|
|
2012-04-16 12:15:30 -07:00
|
|
|
export PATH
|
|
|
|
|
2013-08-29 14:54:01 -07:00
|
|
|
# System specific settings
|
|
|
|
if [[ -e "$HOME/.env.$SYS" ]]; then
|
|
|
|
print_info -l 2 "Sourcing environment setup for $SYS systems"
|
|
|
|
source "$HOME/.env.$SYS"
|
|
|
|
fi
|
|
|
|
|
2012-04-16 12:15:30 -07:00
|
|
|
# Local environment settings
|
2013-08-04 17:13:40 -07:00
|
|
|
if [[ -e $HOME/.env.local ]]; then
|
2012-11-29 15:18:57 -08:00
|
|
|
print_info -l 2 "Sourcing local environment setup"
|
2012-08-17 12:48:04 -07:00
|
|
|
source $HOME/.env.local
|
|
|
|
fi
|