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

feat(cli): Completions #7

Merged
merged 4 commits into from
Aug 6, 2019
Merged

feat(cli): Completions #7

merged 4 commits into from
Aug 6, 2019

Conversation

sh0rez
Copy link
Member

@sh0rez sh0rez commented Jul 25, 2019

This PR does initial work on completing environments when using the commands eval, apply, etc.

Due to limitations in the spf13/cobra library, only bash is supported at the moment. Changed in 99f72e1

Closes #5

@sh0rez sh0rez added kind/feature Something new should be added component/cli Command Line Interface labels Jul 25, 2019
@sh0rez sh0rez requested a review from gouthamve July 25, 2019 10:27
@sh0rez sh0rez self-assigned this Jul 25, 2019
@dep dep bot added the dependent label Jul 25, 2019
sh0rez added 4 commits August 6, 2019 15:49
Adds a custom bash completion script that kicks in if the subcommand is
accepting an environment. It will dynamically look for environments in the child
folders and suggest them.
Did only complete baseDirs when in rootDir so far. Now completes whenever we are
inside a tanka context
Uses https://github.com/posener/complete instead of the builtin generator of
cobra. This has the advantage that we do not rely on scripts anymore but handle
our completion ourselves.

This furthermore allows us to use native go functions to return predictions.

Works now on bash, zsh and fish!
Adds more descriptive error messages, that explain why a certain action was required.
@dep dep bot removed the dependent label Aug 6, 2019
@sh0rez sh0rez merged commit aea3bdf into master Aug 6, 2019
@sh0rez sh0rez deleted the cli-complete branch August 6, 2019 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/cli Command Line Interface kind/feature Something new should be added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tab completion
2 participants