From 9a10e8315aa7f148cd1a51cd9ac54a20f2ad09a4 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Mon, 23 Nov 2020 00:19:19 +0100 Subject: [PATCH] axzshctl check-plugins: Enhance output --- bin/axzshctl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bin/axzshctl b/bin/axzshctl index 4a6fadc..34d198e 100755 --- a/bin/axzshctl +++ b/bin/axzshctl @@ -329,12 +329,15 @@ function CheckPlugins { plugin=${dir:t} # Test if plugin is already enabled - [[ -e "$AXZSH/active_plugins/$plugin" ]] \ - && enabled=" (enabled)" \ - || unset enabled + if [[ -e "$AXZSH/active_plugins/$plugin" ]]; then + printf ' \e[1;32m+\e[m "\e[1m%s\e[m" ... ' "${plugin}" + enabled=1 + else + printf ' \e[1;31m-\e[m "%s" ... ' "${plugin}" + unset enabled + fi # Test plugin ... - printf " - \"%s\"%s ... " "$plugin" "$enabled" new_plugin="" for script ($AXZSH/plugins/$plugin/$plugin.{zshrc,zprofile,ax-io}); do [[ -r "$script" ]] || continue @@ -354,7 +357,7 @@ function CheckPlugins { ax_msg 1 "optional." else [[ -n "$enabled" ]] && invalid_plugins+=($plugin) - ax_msg 2 "failed." + ax_msg 2 "failed ($r)." fi done echo -- 2.39.2