From 9bf4e2b60f3b722c937cadfc37cc4ebb25b62115 Mon Sep 17 00:00:00 2001 From: GRMrGecko Date: Fri, 29 Jul 2022 23:41:27 -0500 Subject: [PATCH] Changed plugin logic --- .config/zsh/functions | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.config/zsh/functions b/.config/zsh/functions index b9d00e2..6977287 100644 --- a/.config/zsh/functions +++ b/.config/zsh/functions @@ -5,10 +5,9 @@ function zsh_add_config() { function zsh_add_plugin() { PLUGIN_NAME=$(echo $1 | cut -d"/" -f2) - if [ -d "$ZSH_CONFIG/plugins/$PLUGIN_NAME" ]; then - zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh" - zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.zsh" - else + if ! [ -d "$ZSH_CONFIG/plugins/$PLUGIN_NAME" ]; then git clone "https://github.com/$1.git" "$ZSH_CONFIG/plugins/$PLUGIN_NAME" fi + zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh" + zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.zsh" }