26 lines
843 B
Bash
26 lines
843 B
Bash
#!/bin/zsh
|
|
|
|
### Statically source all bundles from the plugins file.
|
|
#
|
|
# usage: antidote load [-h|--help] [<bundlefile> [<staticfile>]]
|
|
#
|
|
#function antidote-load {
|
|
if [[ "$1" == (-h|--help) ]]; then
|
|
antidote-help load
|
|
return
|
|
fi
|
|
|
|
# We can't use LOCAL_OPTIONS because sourcing plugins means we'd lose any Zsh options
|
|
# set in those plugins, so we delegate all the work to __antidote_load_prep where
|
|
# we can safely use LOCAL_OPTIONS. For this function, we should do the bare minimum
|
|
# so the user can set whatever crazy Zsh options they want, and antidote doesn't need
|
|
# to concern itself with that.
|
|
#
|
|
# "Is your house on fire, Clark? No, Aunt Bethany, those are the user's Zsh options."
|
|
#
|
|
typeset -g REPLY=
|
|
__antidote_load_prep "$@" || return 1
|
|
[[ -f "$REPLY" ]] || return 2
|
|
source "$REPLY"
|
|
unset REPLY
|
|
#}
|