-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
122 lines (113 loc) · 3.79 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
114
115
116
117
118
119
120
121
122
export PATH=$HOME/bin:/usr/local/bin:$PATH:/usr/local/go/bin:$HOME/go/bin
export GOPATH=$HOME/go
ZSH_DISABLE_COMPFIX=true
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
DISABLE_AUTO_TITLE="true"
# ENABLE_CORRECTION="true"
COMPLETION_WAITING_DOTS="true"
# Standard plugins can be found in $ZSH/plugins/
plugins=(git docker vi-mode kubectl)
# see https://github.com/softmoth/zsh-vim-mode
source $ZSH/oh-my-zsh.sh
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PATH="/usr/local/opt/[email protected]/sbin:$PATH"
# For compilers to find [email protected] you may need to set:
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"
export ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX=YES
alias cat="bat"
alias setclip="xclip -selection c"
alias getclip="xclip -selection c -o"
#alias aws="docker run --rm -it \
# -e AWS_PROFILE -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION -e AWS_SESSION_TOKEN \
# -v "~/.aws:/root/.aws" -v "$(pwd):/aws:rw" \
# amazon/aws-cli"
# alias kops="docker run --rm -it -e NAME -e KOPS_STATE_STORE -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION \
# -v "$HOME"/.ssh:/root/.ssh:ro \
# -v "$HOME"/.aws:/root/.aws:ro \
# -v "$HOME"/.kube:/root/.kube:rw \
# -v "$(pwd)":/workdir \
# -w /workdir \
# kops:1.18.2"
# alias kubectl="docker run --rm -it \
# -v "$HOME"/.ssh:/root/.ssh:ro \
# -v "$HOME"/.aws:/root/.aws:ro \
# -v "$HOME"/.kube:/root/.kube:rw \
# -v "$(pwd)":/workdir \
# -w /workdir \
# kubectl:1.19.3"
# alias k="docker run --rm -it \
# -v "$HOME"/.ssh:/root/.ssh:ro \
# -v "$HOME"/.aws:/root/.aws:ro \
# -v "$HOME"/.kube:/root/.kube:rw \
# -v "$(pwd)":/workdir \
# -w /workdir \
# kubectl:1.19.3"
# alias helm="docker run --rm -it \
# -v "$HOME"/.ssh:/root/.ssh:ro \
# -v "$HOME"/.aws:/root/.aws:ro \
# -v "$HOME"/.kube:/root/.kube:rw \
# -v "$(pwd)":/workdir \
# -w /workdir \
# helm:3.4.2"
#alias helm="docker run -it --rm \
# -v "$HOME"/.ssh:/root/.ssh:ro \
# -v "$HOME"/.aws:/root/.aws:ro \
# -v "$HOME"/.kube:/root/.kube:rw \
# -v "$(pwd)":/workdir \
# -w /workdir \
# mytools:0.0.1 /usr/local/bin/helm"
#alias k="docker run -it --rm \
# -v "$HOME"/.ssh:/root/.ssh:ro \
# -v "$HOME"/.aws:/root/.aws:ro \
# -v "$HOME"/.kube:/root/.kube:rw \
# -v "$(pwd)":/workdir \
# -w /workdir \
# mytools:0.0.1 /usr/local/bin/kubectl"
#alias kops="docker run -it --rm \
# -v "$HOME"/.ssh:/root/.ssh:ro \
# -v "$HOME"/.aws:/root/.aws:ro \
# -v "$HOME"/.kube:/root/.kube:rw \
# -v "$(pwd)":/workdir \
# -w /workdir \
# mytools:0.0.1 /usr/local/bin/kops"
alias da="direnv allow"
alias zshrc="vi ~/.zshrc"
alias vimrc="vi ~/.vimrc"
eval "$(direnv hook zsh)"
export DOCKER_BUILDKIT=1
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
. $HOME/.asdf/asdf.sh
# Autocompletion
source <(kubectl completion zsh)
source <(helm completion zsh)
source <(stern --completion=zsh)
source <(minikube completion zsh)
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
autoload bashcompinit && bashcompinit
complete -C '/usr/local/bin/aws_completer' aws
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
source $HOME/.kube_ps1/kube-ps1.sh
PROMPT='$(kube_ps1)'$PROMPT
# VI mode
#bindkey -v
function zle-keymap-select zle-line-init
{
# change cursor shape in iTerm2
case $KEYMAP in
vicmd) print -n -- "\E]50;CursorShape=0\C-G";; # block cursor
viins|main) print -n -- "\E]50;CursorShape=1\C-G";; # line cursor
esac
zle reset-prompt
zle -R
}
function zle-line-finish
{
print -n -- "\E]50;CursorShape=0\C-G" # block cursor
}
zle -N zle-line-init
zle -N zle-line-finish
zle -N zle-keymap-select