Skip to content

Instantly share code, notes, and snippets.

@mariuszs
Created March 9, 2016 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariuszs/2f76c351f788c61bdb4d to your computer and use it in GitHub Desktop.
Save mariuszs/2f76c351f788c61bdb4d to your computer and use it in GitHub Desktop.
sdkman 3.3.2+ with fishshell
# sdkman
set PATH $PATH (find ~/.sdkman/candidates/*/current/bin -maxdepth 0)
@montaro
Copy link

montaro commented Jan 22, 2018

didn't work for me!

@reitzig
Copy link

reitzig commented Jul 14, 2018

For full support, install reitzig/sdkman-for-fish (self-plug, sorry).

@EdwinVanRooij
Copy link

Simple solution, works for me. Thanks!

@plainas
Copy link

plainas commented May 6, 2019

It works fine but you it will throw an error in case you have not installed any environment. You calso need to refresh it each time you install a new 'development kit'. You can do this by simply start a new shell, for example, opening a new terminal window.

Personally I prefer this simple solution that I know exactly what it does. Perhaps add a guard to cover the case where find doesn't find anything.

@filiagees
Copy link

filiagees commented Jun 21, 2020

Based on previous comments I'm using the follow (my installation is in a non-default location):

set SDKMAN_NUM_ENVS (ls $SDKMAN_DIR/candidates/ |wc -l)
if test $SDKMAN_NUM_ENVS -gt 0
        set PATH $PATH (find $SDKMAN_DIR/candidates/*/current/bin -maxdepth 0)
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment