From a27a8dbcb119a03cc3f0c6783659d35f0544f988 Mon Sep 17 00:00:00 2001 From: Anthony Cicchetti Date: Thu, 29 Apr 2021 09:19:00 -0400 Subject: [PATCH] Fix anyenv init? (again?) --- zsh/zshrc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/zsh/zshrc b/zsh/zshrc index 877282a..f129963 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -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 -