sdkman-for-fish
sdkman-for-fish copied to clipboard
Adds support for SDKMAN! to fish
SDKMAN! for fish
Makes command sdk
from SDKMAN! usable from fish, including auto-completion.
Also adds binaries from installed SDKs to the PATH.
Version 1.4.0 tested with
- fish 2.7.1 and 3.1.2, and
- SDKMAN! 5.8.2, on
- Ubuntu 18.04 LTS and macOS 10.13
Install
With fisher (install separately):
fisher install reitzig/[email protected]
Note:
- Only compatible with fisher v3 upwards; v2 is no longer supported.
- You have to install SDKMAN! separately.
Usage
It's all in the background; you should be able to run sdk
and binaries installed
with sdk
as you would expect.
Contribute
When you make changes, please run the tests at least on one platform before creating a pull request.
As the tests may mess up your own setup -- you have been warned! -- the recommended way is to run the tests in a Docker container:
docker build -t sdkman-for-fish-tests -f test/Dockerfile .
docker run --rm sdkman-for-fish-tests
A run configuration for Jetbrains IDEs is included.
It is a also possible to run individual features, for instance:
docker run --rm sdkman-for-fish-tests features/completions.feature
As a corollary, this is the fastest way to run all tests (if you do not care about the report):
for f in features/*.feature
docker run --rm sdkman-for-fish-tests "$f" &
done
wait
Acknowledgements
- Completion originally by Ted Wise; see his blog post from 2016.
- Binary loading originally by Koala Yeung; see his comment on sdkman/sdkman-cli#294.
- While this is predominantly a personal project, the initial migration to Cucumber tests was done as spike on 20% time graciously provided by codecentric. Thank you!