# vim: ft=sh export EDITOR='vim' export PAGER='less' # Paths export PATH=$HOME/dotfiles/bin:$HOME/bin:$PATH export MANPATH=$MANPATH:$HOME/dotfiles/shell/man # Machine-specific environment settings [[ -n ${BASH_VERSION-} && -r ~/.bashenv.local ]] && source ~/.bashenv.local [[ -n ${ZSH_VERSION-} && -r ~/.zshenv.local ]] && source ~/.zshenv.local # Config Files: Which Are Sourced, And When? # # # BASH # # .bash_profile: interactive login # .bash_login: as above but lower preference # .profile: as above but lower preference # .bashrc: interactive non-login # # Interactive = not a script. # Login = shell that starts with a computer, or connection from tty or ssh. # Non-login = shell that starts from a terminal emulator or GUI. # So, put things mostly in `.bashrc`, source from `.bash_profile`. # # # ZSH # # .zshenv: (always) # .zprofile: [[ -o login ]] # .zshrc: [[ -o interactive ]] # .zlogin: [[ -o login ]] # # As seen, `zshenv` is sourced on all invocations of zsh. It is useful for # setting variables that should be available to other programs e.g. `PATH`, # `EDITOR`, `PAGER`, and generally not the place to put commands that produce # output or assume attachment to a tty/terminal. # # https://shreevatsa.wordpress.com/2008/03/30/zshbash-startup-files-loading-order-bashrc-zshrc-etc/ # http://blog.flowblok.id.au/2013-02/shell-startup-scripts.html