mirror of
https://github.com/ethauvin/sdkman-for-fish.git
synced 2025-04-25 05:17:11 -07:00
Refactoring: Define sdkman-init variable only once and "hide" it.
Also nicer test output.
This commit is contained in:
parent
597945453d
commit
8a14b1d570
3 changed files with 8 additions and 9 deletions
|
@ -1,11 +1,9 @@
|
|||
set sdkman_init "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
|
||||
# Guard: SDKMAN! needs to be installed
|
||||
if not test -f "$sdkman_init"
|
||||
if not test -f "$__fish_sdkman_init"
|
||||
exit 0
|
||||
end
|
||||
|
||||
# Declare the sdk command for fish
|
||||
function sdk -d "Manage SDKs"
|
||||
__fish_sdkman_run_in_bash "source $sdkman_init && sdk $argv"
|
||||
__fish_sdkman_run_in_bash "source $__fish_sdkman_init && sdk $argv"
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue