-
Notifications
You must be signed in to change notification settings - Fork 0
/
.antidote.zsh
47 lines (36 loc) · 1.03 KB
/
.antidote.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
39
40
41
42
43
44
45
46
#
# Global antidote configuration
#
#
# Load various lib files
#
# Set the name of the static .zsh plugins file antidote will generate.
zsh_plugins=${ZDOTDIR:-~}/.zsh_plugins.zsh
# Ensure you have a .zsh_plugins.txt file where you can add plugins.
[[ -f ${ZDOTDIR:-~}/dotfiles/.zsh_plugins.txt ]] || touch ${ZDOTDIR:-~}/dotfiles/.zsh_plugins.txt
# Lazy-load antidote.
fpath+=(${ZDOTDIR:-~}/.antidote)
autoload -Uz $fpath[-1]/antidote
# Generate static file in a subshell when .zsh_plugins.txt is updated.
if [[ ! $zsh_plugins -nt ${ZDOTDIR:-~}/dotfiles/.zsh_plugins.zsh ]]; then
(antidote bundle <${ZDOTDIR:-~}/dotfiles/.zsh_plugins.txt >|$zsh_plugins)
fi
# Source your static plugins file.
source $zsh_plugins
#
# antidote Bundles
#
DISABLE_UPDATE_PROMPT=true
DISABLE_AUTO_UPDATE=true
if ! type jump > /dev/null; then
antidote bundle agkozak/zsh-z
else
eval "$(jump shell --bind=z)"
fi
#
# antidote theme
#
function antidote_rebuild() {
(antidote bundle <${ZDOTDIR:-~}/dotfiles/.zsh_plugins.txt >|$zsh_plugins)
source $zsh_plugins
}