Fix anyenv init? (again?)

This commit is contained in:
Anthony Cicchetti 2021-04-29 09:19:00 -04:00
parent 6861600cb6
commit a27a8dbcb1

View file

@ -40,16 +40,18 @@ export VISUAL='emacsclient -c -a=""'
export EDITOR='editn'
path=("$HOME/bin" "$HOME/go/bin" $path)
local ZSH_PLUGIN_DIR="$HOME/.zsh_plugins"
zstyle ':znap:*' repos-dir "${ZSH_PLUGIN_DIR}"
zstyle ':znap:*' auto-compile no
local ZSH_PLUGIN_DIR="$HOME/.zsh_plugins"
if [[ ! -d "${ZSH_PLUGIN_DIR}/zsh-snap" ]]; then
mkdir -p ~/.zsh_plugins
cd ~/.zsh_plugins
git clone https://github.com/marlonrichert/zsh-snap.git
fi
zstyle ':znap:*' plugins-dir "${ZSH_PLUGIN_DIR}"
source "${ZSH_PLUGIN_DIR}/zsh-snap/znap.zsh" && export ZNAP_USED=1
local -a paths
for line in "${(@f)"$(<~/.zsh_plugins.txt)"}"
{
@ -125,7 +127,7 @@ function root() {
if [[ -d $HOME/.anyenv ]]; then
path+=($HOME/.anyenv/bin)
if [[ ( $ZNAP_USED = 1 ) ]]; then
znap eval anyenv-init 'anyenv init -'
znap eval anyenv-init ${${:-=anyenv}:A}' init -'
else
eval "$(anyenv init -)"
fi
@ -148,4 +150,3 @@ fi
for funcfile in $HOME/.zsh.d/* ; do
source "${funcfile}"
done