-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-deps.zsh
38 lines (29 loc) · 1.12 KB
/
setup-deps.zsh
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
#/!usr/bin/env zsh
function {
local this_dir="$(dirname $0)"
function err () {
echo "${@} does not exists"
echo "Please run ${this_dir}/setup-init.zsh to install dependencies" >&2
}
# zsh completions
f="$(brew --prefix)/share/zsh-completions"
test -d "$f" || err "${f}"
test -d "$f" && fpath=(${f} ${fpath})
f="$(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
test -f "$f" || err "${f}"
test -f "$f" && source "${f}"
f="$(brew --prefix)/share/zsh-history-substring-search/zsh-history-substring-search.zsh"
test -f "$f" || err "${f}"
test -f "$f" && source "${f}"
# scm breeze
f="$HOME/.zsh/deps/scm_breeze/scm_breeze.plugin.zsh"
test -f "${f}" || err "${f}"
test -f "${f}" && source "${f}"
f="$HOME/.zsh/deps/zsh-autosuggestions/zsh-autosuggestions.zsh"
test -f "${f}" || err "${f}"
test -f "${f}" && source "${f}"
f="$HOME/.zsh/deps/powerlevel10k/powerlevel10k.zsh-theme"
test -f "${f}" || err "${f}"
test -f "${f}" && ! grep -q "${f}" "${HOME}/.zshrc" && echo "source $f" >>~/.zshrc
unfunction err
}