1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-23 14:20:08 +00:00

feat(sdkman): add basic initialization for sdkman

This commit is contained in:
David Matheson 2024-07-28 13:09:23 -04:00
parent 01a9556574
commit 88214ad9f7
2 changed files with 22 additions and 0 deletions

14
plugins/sdkman/README.md Normal file
View file

@ -0,0 +1,14 @@
# sdkman
Plugin for SDKMAN, a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems.
Provides initialization for different scenarios where users may have installed.
To use it, add `sdkman` to your plugins array in your zshrc file:
```zsh
plugins=(... sdkman)
```
## Requirements
* [SDKMAN](http://sdkman.io/)

View file

@ -0,0 +1,8 @@
if [[ -z "$SDKMAN_DIR" ]]; then
if [[ -d "$HOME/.sdkman" ]]; then
export SDKMAN_DIR="$HOME/.sdkman"
else
export SDKMAN_DIR="$(brew --prefix sdkman-cli)/libexec" || echo "Cannot find SDKMAN!"
fi
fi
[[ -s "${SDKMAN_DIR}/bin/sdkman-init.sh" ]] && source "${SDKMAN_DIR}/bin/sdkman-init.sh"