3 # This file sets up the environment correctly. It gets run for every shell,
4 # so it must be fast. Also, starting a shell within a shell shouldn't change
5 # the environment. The path manipulation functions are useful for this.
7 # Root gets the default umask. Files created by my user are only rwx by user/group
8 if [ "$(id -un)" = "root" ]; then
14 # General environment settings
17 export RSYNC_RSH="ssh"
18 export PYTHONSTARTUP="${HOME}/.pythonrc.py"
19 export EMAIL="James Bunton <jamesbunton@delx.net.au>"
22 if emacsclient --version &> /dev/null; then
23 export ALTERNATE_EDITOR="vim"
24 export EDITOR="emacsclient --create-frame"
29 # Expand any symbolic links in the TMPDIR environment variable
30 [ -n "$TMPDIR" ] && export TMPDIR="$(cd "${TMPDIR}" && pwd -P)"
32 # Load the bash functions
33 source "${HOME}/.bash/functions"
35 # The current directory shouldn't be in the path
38 # Load local environment settings
39 [ -r "${HOME}/.bash/environment_local" ] && source "${HOME}/.bash/environment_local"
41 # ~/bin should be in the front of path if it exists
42 pathprepend "${HOME}/bin"