-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshrc.tmpl
80 lines (62 loc) · 2.19 KB
/
dot_zshrc.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Enable Zsh profiler
zmodload zsh/zprof
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
# fi
# set paths
export BREW_PATH="/opt/homebrew/sbin:/opt/homebrew/bin:/usr/local/sbin:/usr/local/bin"
export PATH="$BREW_PATH:$PATH:$HOME/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# set default editor
export EDITOR='nvim'
# utf-8 all the things
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# set colors
export TERM=xterm-256color
export CLICOLOR=1
export LS_COLORS="di=1;34:ln=1;35:so=1;31:pi=1;33:ex=1;32:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43"
# set default blocksize for ls, df, du
export BLOCKSIZE=1k
# gpg
export GPG_TTY=$(tty)
# NVM plugin settings
export NVM_AUTO_USE=true
export NVM_COMPLETION=true
export NVM_LAZY_LOAD=true
# Ignores all one-word commands for more efficient bash history searching
export HISTIGNORE=?
# Long history without duplicates, flush after every command
export HISTCONTROL=ignoreboth:erasedups
export HISTSIZE=1000000
# When the shell exits, append to the history file instead of overwriting it
setopt appendhistory
setopt sharehistory
setopt incappendhistory
setopt hist_ignore_all_dups
setopt hist_find_no_dups
setopt hist_save_no_dups
setopt hist_reduce_blanks
setopt hist_beep
bindkey "^[[A" history-search-backward
bindkey "^[[B" history-search-forward
# Let Chezmoi handle external updates
DISABLE_AUTO_UPDATE="true"
{{ if (eq .chezmoi.os "darwin") }}
# directory specific .envrc files
eval "$(direnv hook zsh)"
{{ else if (eq .chezmoi.os "linux") }}
[ -d /home/linuxbrew/.linuxbrew ] && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
{{ end }}
# Zsh completion for brew
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
# Set "Oh My Zsh" plugins
plugins=(zsh-autosuggestions zsh-history-substring-search zsh-nvm zsh-syntax-highlighting tmuxinator z)
# Zsh theme
source ~/.zsh_theme
# Aliases are managed here
source ~/.shell_aliases
# Functions are managed here
source ~/.shell_functions
# Work related additions
test -f ~/.work_profile && source ~/.work_profile