-
Notifications
You must be signed in to change notification settings - Fork 1
/
dot-zshrc
68 lines (55 loc) · 1.86 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
export TERM="xterm-256color"
export DEFAULT_USER="$USER"
export EDITOR='vim'
export PATH="$PATH:$HOME/.bin/"
# History
HISTFILE=~/.zsh_history
SAVEHIST=50000
# Autocompletions
autoload -Uz compinit
typeset -i updated_at=$(date +'%j' -r ~/.zcompdump 2>/dev/null || stat -f '%Sm' -t '%j' ~/.zcompdump 2>/dev/null)
if [ $(date +'%j') != $updated_at ]; then
compinit -i
else
compinit -C -i
fi
zmodload -i zsh/complist
# Options
setopt auto_list # automatically list choices on ambiguous completion
setopt auto_menu # automatically use menu completion
setopt always_to_end # move cursor to end if word had one match
# Autocompletion style
zstyle ':completion:*' menu select # select completions with arrow keys
zstyle ':completion:*' group-name '' # group results by category
zstyle ':completion:::::' completer _expand _complete _ignored _approximate # enable approximate matches for completion
# Powerlevel9k Theme
source ${HOME}/.powerlevel9k
# Oh-my-zsh for Antibody
DISABLE_AUTO_UPDATE=true
ZSH="$(antibody home)/https-COLON--SLASH--SLASH-github.com-SLASH-robbyrussell-SLASH-oh-my-zsh"
ZSH_CACHE_DIR="$HOME/.oh-my-zsh/cache"
[ -d "${ZSH_CACHE_DIR}" ] || mkdir -p "${ZSH_CACHE_DIR}"
# Antibody
source <(antibody init)
antibody bundle < ~/.antibody.plugins.txt
# Custom completions
compdef _hosts ssh-multi
# Golang
export GOPATH="$HOME/go"
export GOBIN="$GOPATH/bin"
export PATH="$GOBIN:$PATH"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
export CGO_CFLAGS_ALLOW=-Xpreprocessor
# Python
export PIP_REQUIRE_VIRTUALENV=true
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
# Ruby
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
# Fuzzy search
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# External sources
source ~/.aliases
[ -f ~/.aliases.local ] && source ~/.aliases.local
[ -f ~/.zshrc.local ] && source ~/.zshrc.local