Created
March 9, 2016 14:25
-
-
Save mariuszs/2f76c351f788c61bdb4d to your computer and use it in GitHub Desktop.
sdkman 3.3.2+ with fishshell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sdkman | |
set PATH $PATH (find ~/.sdkman/candidates/*/current/bin -maxdepth 0) |
For full support, install reitzig/sdkman-for-fish (self-plug, sorry).
Simple solution, works for me. Thanks!
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.
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
didn't work for me!