Open
Conversation
4aa35fe to
963e55e
Compare
5d12878 to
e01b8ce
Compare
e01b8ce to
57cabee
Compare
|
@molisani is this still planning on being merged? Its been stuck for a few months |
Member
Author
Sorry for the delay, but yes I am still hoping to land this. I should have more time to work on getting this tested and released before the end of the year. |
|
@molisani awesome! Thanks for your hard work |
57cabee to
c5135e1
Compare
6cbd3d4 to
d485405
Compare
7b982e7 to
75f4057
Compare
6bf7d13 to
5a79ff4
Compare
Signed-off-by: mmolisani <mmolisani@bloomberg.net>
5a79ff4 to
05df55d
Compare
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
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.
Describe your changes
The core exposes a function
proposeCompletionsthat is responsible for generating a set of completions for the given app + inputs. However, there needs to be some "glue" to adapt that function for each shell. At the moment, the only shell that's supported isbash(but that is going to change). Currently the "glue" is written into the new application template, which makes it virtually impossible to change and it is only implementing thebash"glue".This PR adds a new
handleCompletionsForShellfunction to@stricli/auto-completethat accepts the same args asproposeCompletionsAND the kind of shell. It then handles the "glue" for that specific shell kind and resolves async. This will allow for changes to this logic to be handled "internally" to these packages, and doesn't require any application-owner changes to support a new shell (once it is supported by@stricli/auto-complete). To this end, there are new "unified" install and "unified" uninstall commands that will attempt to install/uninstall the autocomplete functionality for every supported shell all at once.There is a new set of builder functions for these unified commands as well as builders for route maps that contain the install/uninstall commands for the desired invocation strategy.
Testing performed
Unit tests exercise the new behavior of
@stricli/auto-completeforbashthat handles editing the.bashrcand generating the completions (making sure the inputs and outputs are correct). There are also changes to the@stricli/create-appbaselines to account for the changes in autocomplete handling.These changes were also confirmed manually by generating a new application with
@stricli/create-appand verifying the behavior in abashshell.