From fb234a5e61c96aae213d11a43aae99ee0fd78678 Mon Sep 17 00:00:00 2001 From: Raphael Reitzig <4246780+reitzig@users.noreply.github.com> Date: Thu, 12 Jul 2018 23:46:37 +0200 Subject: [PATCH] A little doc polish. --- README.md | 5 +++-- completions/sdk.fish | 8 ++++++-- conf.d/sdk.fish | 9 ++++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6e4b6b1..4615075 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # SDKMAN! for fish -Provides auto-completion for [SDKMAN!] and adds installed binaries to the PATH. +Makes command `sdk` from [SDKMAN!] available in fish. +Also provides auto-completion and adds binaries from installed SDKs to the PATH. Tested with fish 2.7.1 and SDKMAN! 5.6.5. @@ -21,7 +22,7 @@ with `sdk` as you would expect. * Completion originally by [Ted Wise](https://github.com/ctwise); see his [blog post from 2016](http://tedwise.com/2016/02/26/using-sdkman-with-the-fish-shell). - * Binary loading by [Koala Yeung](https://github.com/yookoala); + * Binary loading originally by [Koala Yeung](https://github.com/yookoala); see [his comment on sdkman/sdkman-cli#294](https://github.com/sdkman/sdkman-cli/issues/294#issuecomment-318252058). [SDKMAN!]: https://github.com/sdkman/sdkman-cli diff --git a/completions/sdk.fish b/completions/sdk.fish index 46c8615..67713af 100644 --- a/completions/sdk.fish +++ b/completions/sdk.fish @@ -1,4 +1,8 @@ -# sdkman autocompletion +# Defines autocompletion for SDKMAN! + +# Copyright (c) 2018 Raphael Reitzig +# MIT License (MIT) +# https://github.com/reitzig/sdkman-for-fish # # # # # # # Completion trigger predicates @@ -152,4 +156,4 @@ complete -c sdk -f -n '__fish_sdkman_command_has_enough_parameters 0 update' # b # flush complete -c sdk -f -n '__fish_sdkman_no_command' -a 'flush' -d 'Clear out cache' complete -c sdk -f -n '__fish_sdkman_using_command flush' -a 'broadcast archives temp' -complete -c sdk -f -n '__fish_sdkman_command_has_enough_parameters 1 flush' # block \ No newline at end of file +complete -c sdk -f -n '__fish_sdkman_command_has_enough_parameters 1 flush' # block diff --git a/conf.d/sdk.fish b/conf.d/sdk.fish index b58c8c1..a8fb51d 100644 --- a/conf.d/sdk.fish +++ b/conf.d/sdk.fish @@ -1,5 +1,12 @@ #!/usr/bin/fish +# Makes command and binaries from SDKMAN! available in fish. +# Delegates to bash for the `sdk` command. + +# Copyright (c) 2018 Raphael Reitzig +# MIT License (MIT) +# https://github.com/reitzig/sdkman-for-fish + set sdkman_init "$HOME/.sdkman/bin/sdkman-init.sh" if test -f "$sdkman_init" @@ -12,4 +19,4 @@ if test -f "$sdkman_init" function sdk bash -c "source $sdkman_init && sdk $argv" end -end \ No newline at end of file +end