zprofile 970 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #
  2. # Editors
  3. #
  4. export EDITOR='nvim'
  5. export VISUAL='nvim'
  6. export PAGER='less'
  7. #
  8. # Language
  9. #
  10. if [[ -z "$LANG" ]]; then
  11. export LANG='en_US.UTF-8'
  12. fi
  13. #
  14. # Paths
  15. #
  16. # Ensure path arrays do not contain duplicates.
  17. typeset -gU cdpath fpath mailpath path
  18. # Set the list of directories that Zsh searches for programs.
  19. path=(
  20. /usr/local/{bin,sbin}
  21. $path
  22. )
  23. #
  24. # Less
  25. #
  26. # Set the default Less options.
  27. # Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
  28. # Remove -X and -F (exit if the content fits on one screen) to enable it.
  29. export LESS='-F -g -i -M -R -S -w -X -z-4'
  30. # Set the Less input preprocessor.
  31. # Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
  32. if (( $#commands[(i)lesspipe(|.sh)] )); then
  33. export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
  34. fi
  35. #
  36. # Temporary Files
  37. #
  38. if [[ ! -d "$TMPDIR" ]]; then
  39. export TMPDIR="/tmp/$LOGNAME"
  40. mkdir -p -m 700 "$TMPDIR"
  41. fi
  42. TMPPREFIX="${TMPDIR%/}/zsh"