From: Alexander Barton Date: Sun, 22 Nov 2020 23:16:04 +0000 (+0100) Subject: axzshctl check-plugins: Correctly handle "ax-io" plugins X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-zsh.git;a=commitdiff_plain;h=7c1d0cadc1e935c89bd15f47593c91c9bb844007 axzshctl check-plugins: Correctly handle "ax-io" plugins --- diff --git a/bin/axzshctl b/bin/axzshctl index c716d16..4a6fadc 100755 --- a/bin/axzshctl +++ b/bin/axzshctl @@ -325,7 +325,7 @@ function CheckPlugins { invalid_plugins=() ax_msg - "Checking plugins ..." - for dir ($AXZSH/plugins/*(N)); do + for dir ($AXZSH/plugins/[a-z0-9]*(N)); do plugin=${dir:t} # Test if plugin is already enabled @@ -336,13 +336,13 @@ function CheckPlugins { # Test plugin ... printf " - \"%s\"%s ... " "$plugin" "$enabled" new_plugin="" - for script ($AXZSH/plugins/$plugin/$plugin.{zshrc,zprofile}); do + for script ($AXZSH/plugins/$plugin/$plugin.{zshrc,zprofile,ax-io}); do [[ -r "$script" ]] || continue AXZSH_PLUGIN_CHECK=1 zsh -i -c "source $script"; r=$? if [[ $r -eq 0 ]]; then new_plugin=$plugin - break fi + break done if [[ -n "$new_plugin" ]]; then detected_plugins+=($new_plugin)