-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzshrc
More file actions
48 lines (40 loc) · 1.18 KB
/
zshrc
File metadata and controls
48 lines (40 loc) · 1.18 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
# Load znap
if [[ -f $HOME/.znap/zsh-snap/znap.zsh ]]; then
source $HOME/.znap/zsh-snap/znap.zsh
if (( ${+commands[starship]} )); then
znap eval starship 'starship init zsh --print-full-init'
(( ${+SSH_TTY} )) || znap prompt
fi
znap source zsh-users/zsh-completions
znap source zsh-users/zsh-history-substring-search
znap source zsh-users/zsh-autosuggestions
znap source jsahlen/tmux-vim-integration.plugin.zsh
# local files
() {
local -a files=($HOME/.zsh/<->_*.zsh)
znap eval locals "cat $files"
}
# oh-my-zsh plugins
() {
local -a plugins=(
asdf git
${commands[ansible]+ansible}
${commands[brew]+brew}
${commands[code]+vscode}
${commands[fzf]+fzf}
${commands[sudo]:+sudo}
${commands[systemd]:+systemd}
)
znap source ohmyzsh/ohmyzsh plugins/$^plugins
}
if (( ${+commands[asdf]} )); then
direnv_path="$(asdf which direnv 2> /dev/null)"
[[ -n "${direnv_path}" ]] && znap eval asdf-direnv "$direnv_path hook zsh"
fi
fi
# Load .zshrc.local if present
if [[ -f $HOME/.zshrc.local ]]; then
source $HOME/.zshrc.local
fi
# Set a variable to prevent $PATH from getting blown away
export ZSH_PATH_SET=1