-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzshrc
More file actions
95 lines (69 loc) · 1.82 KB
/
zshrc
File metadata and controls
95 lines (69 loc) · 1.82 KB
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
91
92
93
94
95
#
# Plugin Manager
#
ANTIDOTE_DIR=${ZDOTDIR:-~}/.antidote
if [[ ! -d ${ANTIDOTE_DIR} ]]; then
git clone --depth=1 https://github.com/mattmc3/antidote.git ${ANTIDOTE_DIR}
fi
source ${ANTIDOTE_DIR}/antidote.zsh
# Load plugins from ~/.zsh_plugins.txt
antidote load
#
# Settings
#
# Set up our prompt and hide the rprompt after commands complete
promptinit && prompt belak
setopt transient_rprompt
# Enable emacs keybinds
bindkey -e
# List dirs first, to match what we do for ls.
zstyle ':completion:*' list-dirs-first true
# Remove _approximate from completers, as I don't ever want things to correct to
# something I didn't type.
zstyle ':completion:*' completer _complete _match
# Disable magic enter, for a similar reason to why I disable the _approximate
# completer.
zstyle ':zephyr:plugin:editor' 'magic-enter' false
# Unset special-dirs so `..` doesn't show up in completions.
zstyle -d ':completion:*' special-dirs
# Set the default Less options.
export LESS='-F -g -i -M -R -S -w -z-4'
#
# Aliases
#
alias json="python -mjson.tool"
alias k="kubectl"
if (( $+commands[nvim] )); then
alias vim="nvim"
fi
#
# Functions
#
gocover () {
t="/tmp/go-cover.$$.tmp"
go test -coverprofile=$t $@ && go tool cover -html=$t && unlink $t
}
#
# Additional Bundles
#
if (( $+commands[fzf] )); then
eval "$(fzf --zsh)"
fi
if (( $+commands[jump] )); then
eval "$(jump shell)"
fi
if (( $+commands[pyenv] )); then
eval "$(pyenv init -)"
fi
if (( $+commands[pyenv-virtualenv-init] )); then
eval "$(pyenv virtualenv-init -)"
fi
if (( $+commands[rbenv] )); then
eval "$(rbenv init -)"
fi
if (( $+commands[direnv] )); then
eval "$(direnv hook zsh)"
fi
# Make it possible to add per-machine customizations.
if [[ -f ~/.zshrc.local ]] source ~/.zshrc.local
#if [[ -f ~/.iterm2_shell_integration.zsh ]] source ~/.iterm2_shell_integration.zsh