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>
I noticed this option was missing from the template. When I followed the directions in README to enable it, I put it below line 59 without noticing it wouldn't have any effect by then. Prevent others from making a rookie mistake like mine.
By convention, user-specific aliases are kept in each user's .zshrc
file. The .zshrc template provided by oh-my-zsh has an area for example
aliases, though these were being loaded before other aliases in libs, plugins,
and themes. As a result, personal aliases could be overwritten by these
other aliases as they are loaded. To make personal customization easier, the
sample aliases section of the .zshrc template has been moved to the area
dedicated for personal customization. This section of the configuration
is processed after all other items are loaded, preventing personal aliases
and exports from being inadvertently clobbered by oh-my-zsh.
Since commands auto-correction must be explicitly enable with
the ENABLE_CORRECTION envvar, this commit replaces the unaccurate
example in the zshrc template.
Although the zshrc template adds a PATH= string, this is overwritten by the installer script.
This allows it to be placed anywhere in the file instead of having to append at the end.
In this commit, the option only works for git but it should not be to hard for
someone who knows svn to so the same.
This commit is largely inspired by @yoavweiss, I only added an option to use
it.