-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc
49 lines (35 loc) · 1.52 KB
/
dot_zshrc
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
# Clone antidote if it's missing.
[[ -d ${ZDOTDIR:-~}/.antidote ]] ||
git clone --depth=1 'https://mirror.ghproxy.com/https://github.com/mattmc3/antidote' ${ZDOTDIR:-~}/.antidote
# Set the name of the static .zsh plugins file antidote will generate.
zsh_plugins=${ZDOTDIR:-~}/.zsh_plugins.zsh
# Ensure you have a .zsh_plugins.txt file where you can add plugins.
[[ -f ${zsh_plugins:r}.txt ]] || touch ${zsh_plugins:r}.txt
# Lazy-load antidote.
fpath+=(${ZDOTDIR:-~}/.antidote/functions)
autoload -Uz $fpath[-1]/antidote
# Generate static file in a subshell when .zsh_plugins.txt is updated.
if [[ ! $zsh_plugins -nt ${zsh_plugins:r}.txt ]]; then
(antidote bundle <${zsh_plugins:r}.txt >|$zsh_plugins)
fi
# Config for brew shell completion
if type brew &>/dev/null
then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
fi
# Compdef is basically a function used by zsh for load the auto-completions.
# The completion system needs to be activated.
# If you’re using something like oh-my-zsh then this is already taken care of,
# otherwise you’ll need to add the following to your ~/.zshrc
autoload -Uz compinit
compinit
# Source your static plugins file.
source $zsh_plugins
eval "$(starship init zsh)"
export FZF_DEFAULT_COMMAND='rg --files'
command -v thefuck > /dev/null 2>&1 && eval $(thefuck --alias)
command -v direnv > /dev/null 2>&1 && eval "$(direnv hook zsh)"
source ~/.zshutils.sh
source ~/.kubecfg.sh
# Finally, load machine level customized config
[[ -s "$HOME/.zsh/.zshrc.local" ]] && source ~/.zsh/.zshrc.local