]> arthur.barton.de Git - ax-zsh.git/commitdiff
axzshctl check-plugins: Correctly handle "ax-io" plugins
authorAlexander Barton <alex@barton.de>
Sun, 22 Nov 2020 23:16:04 +0000 (00:16 +0100)
committerAlexander Barton <alex@barton.de>
Sun, 22 Nov 2020 23:16:04 +0000 (00:16 +0100)
bin/axzshctl

index c716d1688b6e7328e338a8ce74af9cca144aae05..4a6fadc21a69101e53a09b81287f61ddd15b6f9b 100755 (executable)
@@ -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)