docs: Add async_prompt.zsh to OMZ theme migration guide #727
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses an issue encountered when migrating from an Oh My Zsh theme (specifically
robbyrussell
) using Zinit's snippets. Thegit.zsh
library, sourced viazi snippet OMZL::git.zsh
, has a dependency onasync_prompt.zsh
which defines the_omz_register_handler
function. Withoutasync_prompt.zsh
being sourced first, users would encounter acommand not found: _omz_register_handler
error.This change adds
zi snippet OMZL::async_prompt.zsh
to the Oh My Zsh theme migration instructions in the documentation, ensuring that the necessary function is loaded beforegit.zsh
is processed, thus resolving the error and making the migration guide more complete and functional.Related Issue(s)
N/A - This resolves an un-reported setup issue identified during user setup.
Motivation and Context
The primary motivation is to provide a complete and error-free migration path for users transitioning from Oh My Zsh themes (like
robbyrussell
) to Zinit. The previous instructions led to acommand not found
error due to a missing dependency. By includingasync_prompt.zsh
, users can seamlessly set up their environment as intended without encountering this specific error.Usage examples
How Has This Been Tested?
This change has been tested by replicating the initial error (
command not found: _omz_register_handler
) in a fresh Zsh environment configured with the previous documentation's steps. The error was successfully resolved by addingzi snippet OMZL::async_prompt.zsh
as proposed, confirming thatgit.zsh
and the theme now load without issues.Types of changes
Checklist: