-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdot_zshrc.tmpl
More file actions
executable file
·97 lines (65 loc) · 1.83 KB
/
dot_zshrc.tmpl
File metadata and controls
executable file
·97 lines (65 loc) · 1.83 KB
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
#!/usr/bin/env zsh
unsetopt GLOBAL_RCS
if [[ "${TERM_PROGRAM}" == 'iTerm.app' ]]; then
export VISUAL='vim'
else
export VISUAL='codium -w'
fi
# zprezto
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
# compinit
autoload -Uz compinit bashcompinit
compinit
bashcompinit
# zsh-hist
source "${HOME}/.zsh-hist/zsh-hist.plugin.zsh"
bindkey "^Z" undo # Ctrl + Z
bindkey "^[[1;3A" undo # Alt + ↑
# ! hist: warning: $HISTSIZE should be at least 20% larger than $SAVEHIST
export HISTSIZE=$((1.2 * SAVEHIST))
# Starship
eval "$(starship init zsh)"
# fzf
source "${HOME}/.fzf.zsh"
# direnv
eval "$(direnv hook zsh)"
# Python
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
{{ if eq .chezmoi.os "darwin" -}}
# iTerm2
source "${HOME}/.iterm2_shell_integration.zsh"
# 1Password
eval "$(op completion zsh)"
compdef _op op
{{ end -}}
# GitHub
eval "$(gh completion -s zsh)"
compdef _gh gh
# GitLab
eval "$(glab completion -s zsh)"
# ! does NOT work in Bash
# ! bash: compdef: command not found
eval "$(gitlab-ci-local --completion)"
# Terraform
complete -o nospace -C "${HOMEBREW_PREFIX}/bin/terraform" terraform
eval "$(terraform-docs completion zsh)"
compdef _terraform-docs terraform-docs
# Kubernetes
source <(kind completion zsh)
source <(clusterctl completion zsh)
source <(kubectl completion zsh)
source <(stern --completion=zsh)
source <(kustomize completion zsh)
source <(kompose completion zsh)
source <(helm completion zsh)
source <(argocd completion zsh)
source <(flux completion zsh)
# Azure
source "${HOMEBREW_PREFIX}/etc/bash_completion.d/az"
{{ if eq .chezmoi.os "darwin" -}}
# Google Cloud Platform
source "${HOMEBREW_PREFIX}/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc"
source "${HOMEBREW_PREFIX}/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc"
{{ end -}}
source "${HOME}/.aliases"