feat(cli): add omz generate plugin to scaffold custom plugins

Adds a rails-style generator that creates a custom plugin in
$ZSH_CUSTOM/plugins/<name> from commented templates: the plugin file,
a README in the usual shape and, for plugins that wrap a command-line
tool, a completion skeleton (or the cached-completion block when the
tool generates its own). Anything not passed as an option is asked
for interactively; non-interactive shells use defaults.

`omz generate` is a new top-level command so that other generators
(e.g. `omz generate theme`) can follow the same shape.

Templates live in templates/generators/plugin and are syntax-checked
by CI. lib/tests/generate-plugin.test.zsh covers the non-interactive
path, name validation and the prompt helper.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Robby Russell
2026-09-05 14:28:32 -07:00
co-authored by Claude Fable 5.1
parent 593e8ed6c8
commit 46aee25f27
12 changed files with 736 additions and 9 deletions
+1
View File
@@ -38,6 +38,7 @@ jobs:
./lib/*.zsh \
./plugins/*/*.plugin.zsh \
./plugins/*/_* \
./templates/generators/*/*.zsh-template \
./themes/*.zsh-theme; do
zsh -n "$file" || return 1
done