1
0

zlogin 1.1 KB

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