-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
57 lines (44 loc) · 905 Bytes
/
.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
##
# GENERAL
EDITOR=vim
##
# ZSH OPTIONS
# `man zshoptions`
setopt HIST_IGNORE_DUPS
setopt HIST_VERIFY
setopt NO_LISTBEEP
setopt LIST_PACKED
setopt RM_STAR_WAIT
##
# ALIASES
[[ -f ~/.aliases/shared ]] && source ~/.aliases/shared
[[ -f ~/.aliases/private ]] && source ~/.aliases/private
alias config='$EDITOR + ~/.zshrc && source ~/.zshrc'
##
# PROMPT
source ~/.zsh/prompt.zsh
##
# FUNCTIONS
fpath=(~/.zsh/autoload $fpath)
##
# EXTERNALS
__installed () {
command -v 2>&1 1>/dev/null $@
}
if __installed brew; then
HOMEBREW_NO_ANALYTICS=1
fi
__installed thefuck && eval $(thefuck --alias)
__installed rbenv && eval "$(rbenv init - zsh)"
[[ -d ~/.docker/bin ]] && path+=(~/.docker/bin)
__init_nvm() {
unalias nvm
if [[ -f "/usr/local/opt/nvm/nvm.sh" ]]; then
NVM_DIR="$HOME/.nvm"
source "/usr/local/opt/nvm/nvm.sh"
fi
nvm $@
}
alias nvm='__init_nvm'
##
# AUTO-ADDED (evil)