env 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # vim: ft=sh
  2. export EDITOR='vim'
  3. export PAGER='less'
  4. # Shells default to emacs bindings (ESC confuses people), unless a local env
  5. # file sets this to 1.
  6. export VI_MODE=0
  7. # Paths
  8. export PATH=$HOME/dotfiles/bin:$HOME/bin:$PATH
  9. export MANPATH=$MANPATH:$HOME/dotfiles/docs/man
  10. # Machine-specific environment settings
  11. [[ -n ${BASH_VERSION-} && -r ~/.bashenv.local ]] && source ~/.bashenv.local
  12. [[ -n ${ZSH_VERSION-} && -r ~/.zshenv.local ]] && source ~/.zshenv.local
  13. # Config Files: Which Are Sourced, And When?
  14. #
  15. # # BASH
  16. #
  17. # .bash_profile: interactive login
  18. # .bash_login: as above but lower preference
  19. # .profile: as above but lower preference
  20. # .bashrc: interactive non-login
  21. #
  22. # Interactive = not a script.
  23. # Login = shell that starts with a computer, or connection from tty or ssh.
  24. # Non-login = shell that starts from a terminal emulator or GUI.
  25. # So, put things mostly in `.bashrc`, source from `.bash_profile`.
  26. #
  27. # # ZSH
  28. #
  29. # .zshenv: (always)
  30. # .zprofile: [[ -o login ]]
  31. # .zshrc: [[ -o interactive ]]
  32. # .zlogin: [[ -o login ]]
  33. #
  34. # As seen, `zshenv` is sourced on all invocations of zsh. It is useful for
  35. # setting variables that should be available to other programs e.g. `PATH`,
  36. # `EDITOR`, `PAGER`, and generally not the place to put commands that produce
  37. # output or assume attachment to a tty/terminal.
  38. #
  39. # https://shreevatsa.wordpress.com/2008/03/30/zshbash-startup-files-loading-order-bashrc-zshrc-etc/
  40. # http://blog.flowblok.id.au/2013-02/shell-startup-scripts.html