Sdkman-cli: Run `sdk env` automatically when entering a directory with an `.sdkmanrc`

Created on 2 May 2020  路  5Comments  路  Source: sdkman/sdkman-cli

We require a conversation to take place in the appropriate SDKMAN Slack channel before raising a new Github Issue. Please note that issues will be closed immediately if prior discussion did not take place. We need to do this to help manage the quality and validity of Issues raised on this project.

Please tick one:

Please explain the Issue / Feature Request here:
With the env command in place, there should be some hook which runs sdk env automatically whenever a directory is entered which contains an .sdkmanrc.

Most helpful comment

As discussed in slack, this should be configurable through the use of a new config flag. For now it should probably be disabled by default.

All 5 comments

As discussed in slack, this should be configurable through the use of a new config flag. For now it should probably be disabled by default.

Should probably recurse up the directory tree to find the closest .sdkmanrc, not just one in the current directory. This would make each .sdkmanrc apply to its directory and to all its subdirectories, until another .sdkmanrc overrides it for a sub tree.

That would mean it would recurse on every directory change and probably re-executing the one found in $HOME multiple times when traversing directories. Adds additional complexity and slows down the shell for very little benefit IMHO.

I don't think we should go down that road. Let's keep it simple...

With #757 being merged and released as part of 5.8.0 this issue can be closed, right?

Was this page helpful?
0 / 5 - 0 ratings