-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshrc
89 lines (66 loc) · 1.8 KB
/
dot_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
# Add Brew stuff to shell
eval "$(/opt/homebrew/bin/brew shellenv)"
autoload -Uz compinit
compinit
# Path to your oh-my-zsh installation.
export ZSH="/Users/ismailahmad/.oh-my-zsh"
ZSH_THEME="bureau"
plugins=(git)
source $ZSH/oh-my-zsh.sh
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='lvim'
fi
#Kubernetes Aliases
alias k="kubectl"
alias kgp="kubectl get pods"
#Git Aliases
alias gs="git status"
alias ga="git add"
alias gcm="git commit -m"
alias gcms="git commit -S -m"
alias gd="git diff"
## gr is used to traverse back up to the git root
alias gr='cd $(git rev-parse --show-cdup)'
#Terrafrom Aliases
alias tf="terraform"
#Docker Aliases
alias d="docker"
#Other Aliases
alias c="clear"
alias mp="multipass"
alias chz="chezmoi"
alias watch="watch "
# Common Linux/Unix tool alternatives
alias cat="bat -P"
alias ls="exa"
## KUBE PS1
source "$(brew --prefix)/opt/kube-ps1/share/kube-ps1.sh"
PROMPT='$(kube_ps1)'$PROMPT
## KUBECTL KREW PATH UPDATE
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
## Azure-cli completion
autoload -U +X bashcompinit && bashcompinit
source ~/az.completion
## Direnv
eval "$(direnv hook zsh)"
# NVM
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && \. "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
## GPG for git signing
export GPG_TTY=$(tty)
##LVIM and other binaries
export PATH="${HOME}/.local/bin:${HOME}/nvim-osx64/bin:${PATH}"
## Zoxide
eval "$(zoxide init zsh)"
## Custom functions
watch_hr() {
watch -n 10 "kubectl get hr -n bigbang"
}
timezsh() {
shell=${1-$SHELL}
for i in $(seq 1 10); do /usr/bin/time $shell -i -c exit; done
}