Skip to content

miya10kei/sdkman-fish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sdkman-fish

A fish plugin for sdkman.

When you execute install, uninstall, default, or use commands you can select a version with fzf.
Screenshot from 2021-09-22 21-09-01

In addition, this plugin supports auto env function. If .sdkmanrc exists on current or parent directory, your java version in current shell process is changed automatically.

Requirements

  • sdkman
  • fzf
  • gnu sed
    • If you use macos, execute brew install gnu-sed command to install it.

Installation

fisher install miya10kei/sdkman-fish

Configuration

write this on your config.fish

set -x JAVA_HOME $HOME/.sdkman/candidates/java/current

for candidate in $HOME/.sdkman/candidates/* ;
  addPath $candidate/current/bin
end

If you want to use auto env function.
Please write this on your config.fish.

function sdk_auto_env --on-variable PWD
  __sdk_auto_env
end

and write this on your sdkman config.

sdkman_auto_env=false
sdkman_auto_env_fish=true

License

MIT