Home

Awesome

GitHub pre-commit Release

zsh-sdkman

zsh plugin for installing and loading sdkman

This plugin come with completion scripts and aliases

Table of content

This documentation section is generated automatically

<!--TOC--> <!--TOC-->

Dependencies

As this plugin install sdkman, you'll need some packages to ensure this plugin to work :

Usage

Once the plugin installed, sdkman will be available

Bundle zsh-sdkman in your .zshrc

antigen bundle ptavares/zsh-sdkman

Load zsh-sdkman as a plugin in your .zshrc

zplug "ptavares/zsh-sdkman"

Include the load command in your .zshrc

zget load ptavares/zsh-sdkman

Clone zsh-sdkman into your custom plugins repo and load as a plugin in your .zshrc

git clone https://github.com/ptavares/zsh-sdkman.git ~/.oh-my-zsh/custom/plugins/zsh-sdkman
plugins+=(zsh-sdkman)

Keep in mind that plugins need to be added before oh-my-zsh.sh is sourced.

Clone this repository somewhere (~/.zsh-sdkman for example) and source it in your .zshrc

git clone https://github.com/ptavares/zsh-sdkman ~/.zsh-sdkman
source ~/.zsh-sdkman/zsh-sdkman.plugin.zsh

Usage help

Sdkman can be used as usual:

Usage: sdk <command> [candidate] [version]
       sdk offline <enable|disable>

   commands:
       install   or i    <candidate> [version] [local-path]
       uninstall or rm   <candidate> <version>
       list      or ls   [candidate]
       use       or u    <candidate> <version>
       default   or d    <candidate> [version]
       home      or h    <candidate> <version>
       env       or e    [init]
       current   or c    [candidate]
       upgrade   or ug   [candidate]
       version   or v
       broadcast or b
       help
       offline           [enable|disable]
       selfupdate        [force]
       update
       flush             <broadcast|archives|temp>

   candidate  :  the SDK to install: groovy, scala, grails, gradle, kotlin, etc.
                 use list command for comprehensive list of candidates
                 eg: $ sdk list
   version    :  where optional, defaults to latest stable if not provided
                 eg: $ sdk install groovy
   local-path :  optional path to an existing local installation
                 eg: $ sdk install groovy 2.4.13-local /opt/groovy-2.4.13

Usage alias

Here is the list of aliases available through this plugin:

AliasCommand
sdkisdk install
sdkunsdk uninstall
sdklssdk list
sdkusdk use
sdkdsdk default
sdkcsdk current
sdkupsdk upgrade
sdkvsdk version
sdkbsdk broadcast
sdkosdk offline
sdksusdk selfupdate
sdkfsdk flush

Updating sdkman

The plugin comes with a zsh function to update sdkman manually

# From zsh shell
update_zsh_sdkman

License

MIT