zlogin 1.2 KB

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