-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc
81 lines (67 loc) · 2.39 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
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
81
# History
setopt SHARE_HISTORY
setopt HIST_VERIFY
setopt HIST_IGNORE_SPACE
setopt HIST_SAVE_NO_DUPS
setopt HIST_REDUCE_BLANKS
setopt HIST_IGNORE_DUPS
export HISTSIZE=1000000000
export HISTFILESIZE=1000000000
export SAVEHIST=1000000000
export HISTFILE=~/.zsh_history
# Enable Powerlevel11k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
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
# Sourcing
source ~/.zsh_alias
source ~/.zsh_functions
source ~/.zsh_functions_private
fpath=( ~/.zfunc "${fpath[@]}" )
bindkey -e
# Options
setopt AUTO_CD
setopt EXTENDED_GLOB
setopt INTERACTIVE_COMMENTS
setopt NO_CLOBBER
# FZF
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
[ -f /usr/share/fzf/key-bindings.zsh ] && source /usr/share/fzf/key-bindings.zsh
[ -f /usr/share/fzf/completion.zsh ] && source /usr/share/fzf/completion.zsh
export FZF_TMUX=0
export FZF_ALT_C_COMMAND='fd --type d --max-depth 3'
export FZF_CTRL_T_COMMAND='fd'
bindkey '^S' fzf-cd-widget
setopt noflowcontrol
# Keychain
eval `keychain --agents ssh --systemd --eval --quiet`
# Antidote
zhome=${HOME}
if [[ ! $zhome/.zsh_plugins.zsh -nt $zhome/.zsh_plugins.txt ]]; then
[[ -e $zhome/.antidote ]] \
|| git clone --depth=1 https://github.com/mattmc3/antidote.git $zhome/.antidote
[[ -e $zhome/.zsh_plugins.txt ]] || touch $zhome/.zsh_plugins.txt
(
source $zhome/.antidote/antidote.zsh
antidote bundle <$zhome/.zsh_plugins.txt >$zhome/.zsh_plugins.zsh
)
fi
autoload -Uz $zhome/.antidote/functions/antidote
source $zhome/.zsh_plugins.zsh
unset zhome
# Pyenv
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
autoload bashcompinit && bashcompinit
[ -f /usr/bin/aws_completer ] && complete -C '/usr/bin/aws_completer' aws
[ -f /snap/aws-cli/current/bin/aws_completer ] && complete -C '/snap/aws-cli/current/bin/aws_completer' aws
# Nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Direnv
eval "$(direnv hook zsh)"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh