From 89c2d21b8d75048d29ea1528d33d3ee1ddbd86a1 Mon Sep 17 00:00:00 2001 From: Robert Morrison Date: Sun, 20 Feb 2022 01:24:59 +0000 Subject: [PATCH] Fix issues. change some names and now it works. --- ZshPlug.zsh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ZshPlug.zsh b/ZshPlug.zsh index 4e69d2e..6e468ca 100644 --- a/ZshPlug.zsh +++ b/ZshPlug.zsh @@ -54,12 +54,13 @@ fi ## Load custom Plugin directory ## Otherwise use default location export pluginDir=${ZSH_PLUG_pluginDir:-$HOME/.local/share/zsh} -export plugins=${ZSH_PLUG_plugins} ######################## # FUNCTION DEFINITIONS # ######################## +export githubPrefix="https://github.com/" + ZSH_PLUG_pluginTest() { ## Test if a plugin is installed or not ## RETURNS @@ -123,22 +124,22 @@ Plug() { ## No need to check if plugins has content since if there are no plugins this does not run anythinh - for Plugin in $Plugins; do + for Plugin in ${ZSH_PLUG_plugins[@]}; do echo "$Plugin" - pluginTest "$Plugin" + ZSH_PLUG_pluginTest "$Plugin" local exitcode="$?" case $exitcode in 0) ## plugin installed echo "Loading $Plugin" - pluginLoad "$Plugin" + ZSH_PLUG_pluginLoad "$Plugin" ;; 1) ## plugin not installed echo "Installing $Plugin" - pluginInstall "$Plugin" + ZSH_PLUG_pluginInstall "$Plugin" echo "Loading $Plugin" - pluginLoad "$Plugin" + ZSH_PLUG_pluginLoad "$Plugin" ;; 4) ## Too many args to pluginTest