]> arthur.barton.de Git - ax-zsh.git/blobdiff - core/50_axzsh/functions/_axzsh
Enhance support for remote plugins with embedded themes
[ax-zsh.git] / core / 50_axzsh / functions / _axzsh
index 2a62f29364ba8f4548a95fdabc694a94809d7fbb..2f6ab781f6c4b375c8c1138958e7cd3f8833b58b 100644 (file)
@@ -13,6 +13,7 @@ _axzshctl() {
                        check-plugins\:"Check \"useful\" plugins."
                        set-theme\:"Set active theme."
                        upgrade\:"Upgrade AX-ZSH installation (requires Git)."
+                       update-caches\:"Force rebuild of all cache files."
                ))' \
                '*: :->args'
 #
@@ -20,11 +21,14 @@ _axzshctl() {
          'args')
                case "$words[2]" in
                  "enable-plugin"|"disable-plugin")
-                       compadd "$@" $(ls -1 "$AXZSH"/plugins)
+                       compadd "$@" -- \
+                               $(ls -1 "$AXZSH"/plugins) \
+                               $(ls -1 "$AXZSH"/custom_plugins)
                        ;;
                  "set-theme")
-                       [[ -z $words[3] ]] \
-                               && compadd "$@" -- "-" $(ls -1 "$AXZSH"/themes | cut -d'.' -f1)
+                       compadd "$@" -- "-" \
+                               $(ls -1 "$AXZSH"/themes | cut -d'.' -f1) \
+                               $(find "$AXZSH/custom_plugins" "$AXZSH/repos" -maxdepth 2 -iname '*.zsh-theme' -exec basename {} \; | cut -d'.' -f1)
                        ;;
                esac
                ;;