Closed jantobola closed 3 years ago
I will have to look at this; I'll probably have to completely re-implement that feature as sdk
currently is not called automatically from fish.
In the meantime, please consider using direnv as a workaround.
Proposed solution:
sdkman_auto_env
in $SDKMAN_DIR/etc/config
when initializing fishtrue
, set up a function with --on-variable PWD
that checks for .sdkmanrc
and runs sdk env
resp sdk env clear
.I've been having trouble writing tests for this feature. After discussion with the original contributer of the feature to SDKMAN!, I'm still not sure what their intended semantics are, and is seems that the behaviour is different between Bash and zsh.
As such, I may just make a third variant. Still figuring how to write an automated test for it, though.
Fixed on dev
, scheduled for release with 2.0.0.
Note that the feature may be evolving upstream. We'll have to wait and see.
@reitzig Thanks for the fix, I just copied this change locally and works fine for me, would be great if you release this!
Ah yes, sorry for that ... I've been short on free-time (and motivation) for much coding, esp. because some items on the to-do list are a hassle to test. :unamused: And by now, months have gone by and I have to go back and check changelists again. :dizzy_face:
Anyway, FWIW, you can always install the dev branch:
fisher install reitzig/sdkman-for-fish@dev
There's no guarantee, but I try to keep that branch in a working state, if not necessarily terribly consistent regarding what has already been implemented/changed and what hasn't.
When
sdkman_auto_env
is set totrue
, sdk is not changed oncd
It still requires to manually callsdk env