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

Add Support for Shell Completion #19

Open
erikareads opened this issue Dec 30, 2023 · 1 comment
Open

Add Support for Shell Completion #19

erikareads opened this issue Dec 30, 2023 · 1 comment

Comments

@erikareads
Copy link

In order to support shell completion, we'll need something like a subcommand:

$ glint_cli __complete list of arguments h
completion1  description1
completion2  description2

Then we can use a version of cobras shell completion logic:
https://github.com/spf13/cobra/blob/main/bash_completionsV2.go

I'm happy to do the PR that ports the completion logic for each shell from cobra,
but glint will need to support the hidden subcommand to make that work.

@tankorsmash
Copy link

Having a way to dump the list of subcommands would be nice too; I was just looking to make a shallow FZF wrapper with my CLI but I can't find a way to list all the subcommands to pass to FZF. +1 on this issue.

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

2 participants