-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc
85 lines (65 loc) · 2 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Init Prezto
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
# When using zsh-autocompletion
# source ~/.zprezto/contrib/zsh-autocomplete/zsh-autocomplete.plugin.zsh
# GENERAL CONFIG AND PATH
# (For other env vars and dirs, check zshenv)
#------------------
# HOMEBREW INSTALLED
if [ -d "/opt/homebrew" ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
# Autojump
[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh
# asdf-vm
# . $(brew --prefix asdf)/libexec/asdf.sh
# . /opt/homebrew/opt/asdf/libexec/asdf.sh
# smerge
export PATH="$PATH:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/Applications/Sublime Merge.app/Contents/SharedSupport/bin"
# Completions for brew
fpath=($(brew --prefix)/share/zsh/site-functions $fpath) # Homebrew zsh completions
# iTerm Shell Integration
test -e ${HOME}/.iterm2_shell_integration.zsh && source ${HOME}/.iterm2_shell_integration.zsh
fi
# PATH
#------------------
# ASDF
if [ -d ${ASDF_DIR} ]; then
. ${HOME}/.asdf/asdf.sh
fi
# COMPLETIONS
#------------------
# FPATH
fpath=("$HOME/.fpath" $fpath)
fpath=(${ASDF_DIR}/completions $fpath)
# GH CLI completion
if command -v gh > /dev/null 2>&1; then
eval $(gh completion -s zsh)
fi
# colorls
if command -v colorls > /dev/null 2>&1; then
source $(dirname $(gem which colorls))/tab_complete.sh
fi
## Bitwarden
if command -v bw > /dev/null 2>&1; then
eval $(bw completion --shell zsh)
fi
## pipx
if command -v pipx > /dev/null 2>&1; then
export PATH=$PATH:$HOME/.local/bin
fi
# PERSONAL EXTRAS
#------------------
source ~/.zsh_opts
source ~/.zsh_env
source ~/.zsh_functions
source ~/.zsh_aliases
source ~/.zsh_secrets
# Init completions
autoload -U +X bashcompinit && bashcompinit
autoload -Uz compinit && compinit
## General ZSH
zstyle ':completion:*:*:kill:*' menu yes select
zstyle ':completion:*:kill:*' force-list always
zstyle ':completion:*:cd:*' ignore-parents parent pwd