-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
60 lines (47 loc) · 1.55 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
if [[ -f /.dockerenv ]]; then
export ZSH=/root/.oh-my-zsh
else
export ZSH=/home/admir/.oh-my-zsh
fi
ZSH_THEME="agnoster"
DISABLE_AUTO_UPDATE="true"
DISABLE_UNTRACKED_FILES_DIRTY="true"
plugins=(
git
git-extras
python
docker
docker-compose
kubectl
helm
dotenv
terraform
aws
)
source $ZSH/oh-my-zsh.sh
# User configuration
export PATH=$HOME/bin:/usr/local/bin:$PATH
alias dotconfig='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
alias pwd-localhost-run='python3 -m http.server &; ssh -R 80:localhost:8000 ssh.localhost.run'
alias klocal='KUBECONFIG=/etc/rancher/k3s/k3s.yaml kubectl'
which direnv &>/dev/null && eval "$(direnv hook zsh)"
which hcloud &>/dev/null && source <(hcloud completion zsh)
[ -f ~/.zshenv ] && source ~/.zshenv
[ -f ~/.exports ] && source ~/.exports
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
[ -f ~/.dockerfunc ] && source ~/.dockerfunc
[ -f ~/.bash-my-aws/bash_completion.sh ] && source ~/.bash-my-aws/bash_completion.sh
[ -f /usr/share/autojump/autojump.sh ] && source /usr/share/autojump/autojump.sh
[ -f ~/.kubectl_aliases ] && source <(cat ~/.kubectl_aliases | sed -r 's/(kubectl.*) --watch/watch \1/g')
show_virtual_env() {
if [[ -n "$VIRTUAL_ENV" && -n "$DIRENV_DIR" ]]; then
echo "($(basename $VIRTUAL_ENV))"
fi
}
PS1='$(show_virtual_env)'$PS1
function kubectl() { echo "+ kubectl $@">&2; command kubectl $@; }
[[ -d /keys ]] && [ ! -z "$(ls -A /keys)" ] && eval `ssh-agent -s` && ssh-add /keys/*
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
#eval "$(pyenv virtualenv-init -)"
fi