-
Notifications
You must be signed in to change notification settings - Fork 950
Add wizard for installing sbtn and completions #6023
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here's what it looks like in action:
|
I manually tested that it works on mac, linux and windows. I only tested powershell on windows and I only tested bash, zsh and fish on linux and mac. |
With an empty .zshrc, it generates:
For bash, it's:
For fish, it's
For powershell, it's
|
ritschwumm
reviewed
Oct 25, 2020
ritschwumm
reviewed
Oct 25, 2020
eed3si9n
reviewed
Oct 26, 2020
This commit adds a wizard for installing sbtn along with tab completions for bash, fish, powershell and zsh. It introduces the `installSbtn` command which installs sbtn into ~/.sbt/1.0/bin/sbtn(.exe) depending on the platform. It also can optionally install completions. The completions are installed into ~/.sbt/1.0/completions. The sbtn native executable is installed by downloading the sbt universal zip for the version (which can be provided as an input argument with a fallback to the running sbt version) and extracting the platform specific binary into ~/.sbt/1.0/bin. After installing the executable, it offers to setup the path and completions for the four shells. With the user's consent, it adds a line to the shell config that updates the path to include ~/.sbt/1.0/bin and another line to source the appropriate completion file for the shell from ~/.sbt/1.0/completions.
This test works fine locally on all platforms but there are issues in CI. I think that it might work ok with 1.4.2 without a lot of extra effort so I'm going to disable it for now.
eed3si9n
approved these changes
Oct 26, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds a wizard for installing sbtn along with tab completions
for bash, fish, powershell and zsh. It introduces the
installSbtn
command which installs sbtn into ~/.sbt/1.0/bin/sbtn(.exe) depending on
the platform. It also can optionally install completions. The
completions are installed into ~/.sbt/1.0/completions. The sbtn native
executable is installed by downloading the sbt universal zip for the
version (which can be provided as an input argument with a fallback to
the running sbt version) and extracting the platform specific binary
into ~/.sbt/1.0/bin. After installing the executable, it offers to setup
the path and completions for the four shells. With the user's consent,
it adds a line to the shell config that updates the path to include
~/.sbt/1.0/bin and another line to source the appropriate completion
file for the shell from ~/.sbt/1.0/completions.