-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc.local
76 lines (56 loc) · 2.39 KB
/
zshrc.local
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
# install zplug
[ ! -d ~/.zplug ] && curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh| zsh
# load zplug
source ~/.zplug/init.zsh
zplug "zplug/zplug" # Let zplug manage zplug
zplug "yous/vanilli.sh" # A lightweight start point of shell configuration
zplug "zsh-users/zsh-completions" # Additional completion definitions for Zsh
zplug "zsh-users/zsh-autosuggestions" # suggest commands from history
# zplug "yous/lime" # Simple prompt
zplug "nojhan/liquidprompt" # more complexe prompt
#zplug "chriskempson/base16-shell" # Color palette
zplug "plugins/command-not-found.plugin.zsh", from:oh-my-zsh # Suggest to install if command not found
zplug "zsh-users/zsh-syntax-highlighting", defer:2 # Syntax highlighting
zplug "zsh-users/zsh-history-substring-search", defer:3 # ZSH port of Fish shell's history search feature
# Colors
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=243"
export TERM=xterm-256color
# A command-line fuzzy finder
#zplug "junegunn/fzf-bin", from:gh-r, as:command, rename-to:fzf, use:"*linux*amd64*"
bindkey -e # use emacs mode (^a ^e etc.)
zplug "junegunn/fzf", use:"shell/key-bindings.zsh"
# Check for uninstalled plugins and install them.
zplug check || zplug install
# Source plugins and add commands to $PATH, add --verbose for details
zplug load
# Prompt for 'Do you want to install it? (N/y)' if command not found
export COMMAND_NOT_FOUND_INSTALL_PROMPT=1
# zsh has a spelling corrector
setopt CORRECT
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# kubectl
source <(kubectl completion zsh)
alias k=kubectl
autoload -U +X bashcompinit && bashcompinit
complete -F __start_kubectl k
# kubectx/kubens
alias kctx=kubectx
alias kns=kubens
# helm
source <(helm completion zsh)
# local bin
export PATH=$PATH:$HOME/.local/bin
# Go
export PATH=$PATH:/usr/local/go/bin
export GOPATH=$(go env GOPATH)
export PATH=$PATH:$(go env GOROOT)/bin:$GOPATH/bin
# vault
export VAULT_ADDR=https://127.0.0.1:8200
complete -o nospace -C /usr/bin/vault vault
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# configure arm64 or x86_64 brew based on shell arch
if [ "$(arch)" = "arm64" ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
else
eval "$(/usr/local/bin/brew shellenv)"
fi