-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Goal
Have the path to antidote be flexible.
Context
When setting up a fresh instance of InstantOS i noticed that by default, the path to antidote
was always searched under $zshhome/.antibody
Since antidote
devs officially tell ppl you can either install it by pulling git into ${ZDOTDIR:-$HOME}/.antidote
OR
install via a package manager which in turn installs antidote
in a different path.
so basically here
Lines 34 to 57 in c1d559a
install_antidote_plugins() { | |
echo "loading plugin bundle" | |
[ -e "$HOME/.cache/zsh" ] || mkdir -p "$HOME/.cache/zsh" | |
BUNDLEFILE="${BUNDLEFILE:-/usr/share/instantshell/bundle.txt}" | |
# clone antidote if necessary and generate a static plugin file | |
cloneantidote() { | |
ANTIDOTEURL=/usr/share/instantshell/antidote | |
[ -e "$ANTIDOTEURL" ] || ANTIDOTEURL=https://github.com/mattmc3/antidote.git | |
git clone --depth=1 "$ANTIDOTEURL" $zhome/.antidote | |
} | |
if [[ ! $zhome/.zsh_plugins.zsh -nt $zhome/.zsh_plugins.txt ]]; then | |
[[ -e $zhome/.antidote ]] || cloneantidote | |
[[ -e $zhome/.zsh_plugins.txt ]] || touch $zhome/.zsh_plugins.txt | |
( | |
source $zhome/.antidote/antidote.zsh | |
BUNDLESTUFF=$(cat "$BUNDLEFILE") | |
if ! isinstantos | |
then | |
BUNDLESTUFF="$(grep -v instantos <<<"$BUNDLESTUFF")" | |
fi | |
antidote bundle <<<"$BUNDLESTUFF" >$zhome/.zsh_plugins.zsh | |
) | |
fi | |
} |
Tasks
- the
.zshrc
should:- check if
antidote
is ...- not installed,
- install on system via git (maybe also following XDG Base Directory specs if possible...)
- use it for the rest of the function
- not installed,
- installed,
- "find" the path of the installed version & use it
- check if
Metadata
Metadata
Assignees
Labels
No labels