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 dynamic flag completions to CLI #14691

Open
kadinsayani opened this issue Dec 18, 2024 · 0 comments
Open

Add dynamic flag completions to CLI #14691

kadinsayani opened this issue Dec 18, 2024 · 0 comments
Assignees
Labels
Improvement Improve to current situation Jira Triggers the synchronization of a GitHub issue in Jira
Milestone

Comments

@kadinsayani
Copy link
Contributor

Cobra provides support for dynamic flag completions. We can add dynamic completions for flags such as --project, --config, --mode, etc.

For example, lxc init images:alpine/edge c1 -s default --project [TAB] should complete available projects.

We can also mark flags as required for completions, specify valid file extensions for file completions (e.g. yaml for profiles), and limit flag completions to valid directory names (e.g. lxc file push|pull).

@kadinsayani kadinsayani added the Improvement Improve to current situation label Dec 18, 2024
@kadinsayani kadinsayani added this to the later milestone Dec 18, 2024
@kadinsayani kadinsayani changed the title Add dynamic flag completion to CLI Add dynamic flag completions to CLI Dec 18, 2024
@kadinsayani kadinsayani self-assigned this Dec 18, 2024
@kadinsayani kadinsayani added the Jira Triggers the synchronization of a GitHub issue in Jira label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Improve to current situation Jira Triggers the synchronization of a GitHub issue in Jira
Projects
None yet
Development

No branches or pull requests

1 participant