-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc.tmpl
112 lines (94 loc) · 3.65 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
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
###############################################################################
# #
# This file is managed by Chezmoi. Please edit with `chezmoi edit ~/.zshrc` #
# OR #
# `chezmoi edit --apply-template ~/.zshrc` #
# OR #
# directly in the git repo #
# #
###############################################################################
#source ~/.profile
source ~/.functions
PATH=$HOME/bin:/usr/local/bin:/bin:/opt/homebrew/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
#Oh My zsh
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="cloud"
CASE_SENSITIVE="true"
plugins=(
1password
asdf
aws
brew
direnv
docker
fzf
gh
git
iterm2
kube-ps1
kubectl
macos
mosh
mvn
node
npm
pip
rsync
terraform
tmux
) # thefuck)
source $ZSH/oh-my-zsh.sh
#shellopts
setopt BANG_HIST # Treat the '!' character specially during expansion.
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
#setopt SHARE_HISTORY # Share history between all sessions.
unsetopt SHARE_HISTORY # This was driving me nuts
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file.
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
setopt HIST_VERIFY # Don't execute immediately upon history expansion.
setopt HIST_BEEP # Beep when accessing nonexistent history.
# Not sure if this is needed with the fzf plugin loaded from ohmyzsh
# [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
RPROMPT='$(kube_ps1)'
#paging
export AWS_PAGER=bat
export PAGER=bat
BAT_THEME="Visual Studio Dark+"
#aliases
alias pw='xkcdpass -d "-" --numwords 6 |pbcopy'
alias kts=ktx
alias ks="kubecm s"
alias kb="kustomize build"
alias kak="kubectl apply -k"
alias less="bat -f"
alias cat="bat -P"
alias cma="chezmoi apply"
alias cmu="chezmoi update"
alias cmpush="chezmoi git -- add . && chezmoi git -- commit -am 'cli changes' && chezmoi git -- push"
{{- if eq .role "work" }}
#plugins
# 1password
source /Users/cathelijne/.config/op/plugins.sh
# Set Java Home
# source ~/.asdf/plugins/java/set-java-home.zsh
{{- end }}
#completions
eval "$($( whereis glab|awk '{print $2}') completion -s zsh)" || true
eval "$(bw completion --shell zsh); compdef _bw bw;"
eval "$(github-copilot-cli alias -- "$0")" || true
test -f /opt/homebrew/share/google-cloud-sdk/completion.zsh.inc && source /opt/homebrew/share/google-cloud-sdk/completion.zsh.inc
# test -f '/Users/lijn/Library/Preferences/netlify/helper/path.zsh.inc' && source '/Users/lijn/Library/Preferences/netlify/helper/path.zsh.inc'
# eval "$(chezmoi completion zsh)" || true
#hooks
eval "$(direnv hook zsh)" || true
autoload -U compinit && compinit
bindkey "^[^[[D" backward-word
bindkey "^[^[[C" forward-word
kubeoff
echo "Done loading .zshrc"