Load sdk-init when adding the sdk plugin
Author: csifinosCreated Feb 19, 2024Updated Sep 15, 2026
LabelsFeature
If the feature request is for a plugin or theme, specify it here.
SDK plugin
If the feature solves a problem you have, specify it here.
No response
Describe the proposed feature.
When enabling the SDK plugin, the relative script (sdk.plugin.zsh) can load the sdk-init.sh script if the env SDKMAN_DIR is missing.
Describe alternatives you've considered
SDK can be loaded automatically by adding the following in the sdk.plugin.zsh
if [[ -z "$SDKMAN_DIR" ]]; then
if [[ -d "$HOME/.sdkman" ]]; then
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
fi
fi
Additional context
No response
Related Issues
No response
Source: ohmyzsh/ohmyzsh