-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
executable file
·113 lines (93 loc) · 3.12 KB
/
.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Uncomment the following line to disable auto-setting terminal title.
DISABLE_AUTO_TITLE="true"
# https://github.com/neovim/neovim/issues/6134#issuecomment-1086666499
if [ -n "$TMUX" ]; then
export TERM="screen-256color"
else
export TERM="xterm-256color"
fi
export PATH=$HOME/bin:/usr/local/bin:$PATH
fpath+=~/.zfunc
# source file if it exists
include () {
[[ -f "$1" ]] && source "$1"
}
# Antigen
export _ANTIGEN_INSTALL_DIR=~/.antigen
include ~/.powerlevel9k
if [ -f $_ANTIGEN_INSTALL_DIR/antigen.zsh ]; then
source $_ANTIGEN_INSTALL_DIR/antigen.zsh
antigen use ohmyzsh/ohmyzsh
# antigen bundle aws # doesn't work with pyenv
antigen bundle asdf
antigen bundle git
antigen bundle pip
antigen bundle docker
antigen bundle docker-compose
antigen bundle jsontools
antigen bundle kubectl
antigen bundle poetry
antigen bundle tmux
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-completions
antigen bundle RobSis/zsh-completion-generator
# Syntax highlighting bundle
antigen bundle zsh-users/zsh-syntax-highlighting
antigen theme romkatv/powerlevel10k
antigen apply
fi
# END Antigen
# zsh-syntax-highlighting
# https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters/main.md
ZSH_HIGHLIGHT_STYLES[path]='fg=cyan'
# key bindings
bindkey "^[[1~" beginning-of-line
bindkey "^[[4~" end-of-line
bindkey "^[[5~" beginning-of-history
bindkey "^[[6~" end-of-history
bindkey "^[[3~" delete-char
bindkey "^[[2~" quoted-insert
bindkey "^[[5C" forward-word
bindkey "^Oc" emacs-forward-word
bindkey "^[[5D" backward-word
bindkey "^Od" emacs-backward-word
bindkey "^e[[C" forward-word
bindkey "^e[[D" backward-word
bindkey "^H" backward-delete-word
# for rxvt
bindkey "^[[8~" end-of-line
bindkey "^[[7~" beginning-of-line
# for non RH/Debian xterm, can't hurt for RH/DEbian xterm
bindkey "eOH" beginning-of-line
bindkey "eOF" end-of-line
# for freebsd console
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
# completion in the middle of a line
bindkey '^i' expand-or-complete-prefix
function settitle() {
echo -ne "\e]0;$1\a"
}
function zsh_ignore_git() {
git config --add oh-my-zsh.hide-status 1
git config --add oh-my-zsh.hide-dirty 1
}
if [ -d $HOME/.pyenv ]; then
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
if [ -f "$PYENV_ROOT/versions/$(cat $PYENV_ROOT/version)/bin/aws_zsh_completer.sh" ]; then
source "$PYENV_ROOT/versions/$(cat $PYENV_ROOT/version)/bin/aws_zsh_completer.sh"
fi
fi
# Do these last in case they include things used above, e.g.: $PYENV_ROOT
include ~/.export
include ~/.alias
[[ -x "$(command -v brew)" ]] && source $(brew --prefix asdf)/libexec/asdf.sh
[[ -x "$(command -v kubectl)" ]] && source <(kubectl completion zsh)
[[ -x "$(command -v aws_zsh_completer.sh)" ]] && source "$(pyenv which aws_zsh_completer.sh)"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh