-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
90 lines (73 loc) · 2.56 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
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
export ZSH="$HOME/.oh-my-zsh"
plugins=(
docker
docker-compose
git
git-extras
httpie
kubectl
pip
ripgrep
)
ZSH_THEME="powerlevel10k/powerlevel10k"
source $ZSH/oh-my-zsh.sh
zstyle ':completion:*:*:docker:*' option-stacking yes
zstyle ':completion:*:*:docker-*:*' option-stacking yes
zstyle ':completion:*' menu select
setopt nocheckjobs
setopt nohup
alias l="ls --color=auto"
alias gstb="git-status-bulk"
alias tmux="tmux -2"
alias vi="vim"
alias icat="kitty +kitten icat"
alias c="code ."
export CHROME_BIN=$(which google-chrome 2> /dev/null)
export BROWSER=$CHROME_BIN
# export BROWSER=$(which firefox 2> /dev/null)
export HISTFILE=~/.history
export HOMEBREW_NO_GITHUB_API=true
export GOPATH=~/workspace/go
export PATH=$HOME/.local/bin:/usr/local/go/bin:$HOME/.cargo/bin:$GOPATH/bin:$PATH
export PIPENV_VENV_IN_PROJECT=1
export PROJECT_HOME=~/workspace
export TERM=xterm-256color
export TERMINAL=~/.local/bin/kitty
eval "$(direnv hook zsh)"
if ! which rg > /dev/null; then
which ripgrep.rg > /dev/null && alias rg="ripgrep.rg";
fi
if which fzf > /dev/null; then
# source ~/.fzf.zsh
alias k='kubectl'
# Get current context
alias krc='k config current-context'
# List all contexts
alias klc='k config get-contexts -o name | sed "s/^/ /;\|^ $(krc)$|s/ /*/"'
# Change current context
alias kcc='k config use-context "$(klc | fzf -e | sed "s/^..//")"'
# Get current namespace
alias krn='k config get-contexts --no-headers "$(krc)" | awk "{print \$5}" | sed "s/^$/default/"'
# List all namespaces
alias kln='k get -o name ns | sed "s|^.*/| |;\|^ $(krn)$|s/ /*/"'
# Change current namespace
alias kcn='k config set-context --current --namespace "$(kln | fzf -e | sed "s/^..//")"'
fi
source ~/.profile
autoload -Uz compinit
fpath+=~/.zfunc
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
if which kubectl > /dev/null; then
source <(kubectl completion zsh)
fi
autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /home/curvelo/.local/bin/nomad nomad
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh