zlogin 1.2 KB

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