Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest fish users to install sdkman-for-fish #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Drafts a way to provide fish support
Optionally, install sdkman-for-fish after installation was otherwise successful.

 * Does not pester users without fish.
 * Does not pester users which already have an `sdk.fish` file. (Would conflict.)
 * Asks before installing.

Left to do: finish bash trickery; finalize wording.

_Note:_ 
 1. The installation method is opinionated. 
 2. reitzig/sdkman-for-fish may have to mature a bit still.
reitzig authored Jul 14, 2018
commit e2687220c31419b0807d5c3b9c271a942206a286
15 changes: 15 additions & 0 deletions app/views/install.scala.txt
Original file line number Diff line number Diff line change
@@ -286,6 +286,21 @@ if [[ -z $(grep 'sdkman-init.sh' "$sdkman_zshrc") ]]; then
echo "Updated existing ${sdkman_zshrc}"
fi

if [[ -d "${HOME}"/.config/fish && ! -f "${HOME}"/.config/fish/conf.d/sdk.fish ]]; then
echo "It seems you have fish installed. Unfortunately, SDKMAN! does not work with fish out of the box."
echo "Install third-party support now? [y/N/?]"

# ? --> show what will be installed (necessary?)

if [[ y ]]; then
if [[ ! -f "${HOME}"/.config/fish/functions/fisher.fish ]]; then
curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs https://git.io/fisher
fi

fisher reitzig/sdkman-for-fish
fi
fi

echo -e "\n\n\nAll done!\n\n"

echo "Please open a new terminal, or run the following in the existing one:"