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

Auto-generate zshell script to perform completions for a CLI #3

Closed
jdegoes opened this issue May 9, 2020 · 2 comments
Closed

Auto-generate zshell script to perform completions for a CLI #3

jdegoes opened this issue May 9, 2020 · 2 comments

Comments

@jdegoes
Copy link
Member

jdegoes commented May 9, 2020

See here for a tutorial, here for the reference, and #2 for the corresponding Bash ticket for more details.

@h-ayat
Copy link

h-ayat commented Nov 21, 2020

Interesting feature, I'd like to work on it.

@jdegoes
Copy link
Member Author

jdegoes commented Nov 21, 2020

@h-ayat If you take a look at Fury, a Scala build tool, you can see an example of how this feature is used to great effect.

We have several choices of how to do this one. First off, the auto-completions could be "dumb" and generated from introspecting the Command. Second, they could be "smart" and the shell script could specify running the CLI App in a special mode to generate the auto-completions (e.g. --auto-completion "...").

The CLI App has enough information to do context-sensitive completions. Although this would have to somehow integrate with #5, because if a user types --verb, then we have to identify which option starts with --verb to produce the completion --verbose.

You may be able to find a person to pair with you on this feature in the Discord chat room. In any case, if you have any questions or need a hand, let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants