env 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # vim: ft=sh
  2. export EDITOR='vim'
  3. export PAGER='less'
  4. # Paths
  5. export PATH=$HOME/dotfiles/bin:$HOME/bin:$PATH
  6. export MANPATH=$MANPATH:$HOME/dotfiles/shell/man
  7. # Machine-specific environment settings
  8. [[ -n ${BASH_VERSION-} && -r ~/.bashenv.local ]] && source ~/.bashenv.local
  9. [[ -n ${ZSH_VERSION-} && -r ~/.zshenv.local ]] && source ~/.zshenv.local
  10. # Config Files: Which Are Sourced, And When?
  11. #
  12. # # BASH
  13. #
  14. # .bash_profile: interactive login
  15. # .bash_login: as above but lower preference
  16. # .profile: as above but lower preference
  17. # .bashrc: interactive non-login
  18. #
  19. # Interactive = not a script.
  20. # Login = shell that starts with a computer, or connection from tty or ssh.
  21. # Non-login = shell that starts from a terminal emulator or GUI.
  22. # So, put things mostly in `.bashrc`, source from `.bash_profile`.
  23. #
  24. # # ZSH
  25. #
  26. # .zshenv: (always)
  27. # .zprofile: [[ -o login ]]
  28. # .zshrc: [[ -o interactive ]]
  29. # .zlogin: [[ -o login ]]
  30. #
  31. # As seen, `zshenv` is sourced on all invocations of zsh. It is useful for
  32. # setting variables that should be available to other programs e.g. `PATH`,
  33. # `EDITOR`, `PAGER`, and generally not the place to put commands that produce
  34. # output or assume attachment to a tty/terminal.