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-provide command line completions #116

Open
scop opened this issue Nov 6, 2023 · 0 comments
Open

Auto-provide command line completions #116

scop opened this issue Nov 6, 2023 · 0 comments

Comments

@scop
Copy link

scop commented Nov 6, 2023

Currently there are manually written fish shell completions in the repo, and bash completions in a pull request.

I'd suggest switching command line option parsing to a thing that generates them automatically, and for more shells.

For example, https://github.com/spf13/cobra. https://github.com/mitchellh/cli is another alternative. And https://github.com/posener/complete/tree/master directly too (mitchellh/cli uses an earlier v1 version of this), but its "auto install" is in my opinion inferior.

Autogenerating completions to stdout makes it possible for example for bash-completion to load them automatically on demand, like https://github.com/scop/bash-completion/blob/master/completions/_golangci-lint (cobra flavor) or https://github.com/scop/bash-completion/blob/master/completions/_vault (mitchellh/cli flavor) -- we'd add such a snippet for gron if it had it. In such cases people would not have to bother with "installing" the completion files at all, it would Just Work.

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

No branches or pull requests

1 participant