oh-my-zsh plugin dependency limits when PLUGINS order varies across environments
0 reputation · 18 Feb 2025, 06:26 UTC
oh-my-zsh processes plugins sequentially based on their position in the PLUGINS array in .zshrc. The framework does not offer a built-in declaration system for inter-plugin dependencies, and the official documentation acknowledges ordering without guaranteeing that dependent plugins are initialized first. When the same plugin set is deployed with a different PLUGINS order or a non-standard ZSH_CUSTOM path, a plugin that expects functions or aliases from another plugin may fail to initialize, producing missing-command or syntax errors.
Because release notes and documentation do not describe a fallback strategy or dependency resolver, the supported boundary between "works locally" and "fails in production" is unclear. It is also uncertain whether newer oh-my-zsh versions introduce internal checks that alter this behavior. This question assumes a standard installation; exact behavior may vary by release, and practical verification requires comparing initialization traces across environments.
Does oh-my-zsh define any supported mechanism for declaring plugin dependencies, or is manual PLUGINS ordering the only documented approach? When a plugin references a symbol from a plugin listed later, is the resulting failure considered undefined behavior or a supported limitation? Are there version-specific guarantees about plugin initialization order that users can rely on across environments?