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

Use Cobra flag helpers for better shell completion #541

Open
imjasonh opened this issue Dec 14, 2021 · 6 comments
Open

Use Cobra flag helpers for better shell completion #541

imjasonh opened this issue Dec 14, 2021 · 6 comments
Assignees
Labels

Comments

@imjasonh
Copy link
Member

Cobra has a helper methods which can make shell completion a little nicer:

  • MarkFlagFilename tells Cobra that the flag represents a filename. This tells the ko completion logic to generate helpers to match filenames. (e.g., ko apply -f <tab>)
  • MarkFlagRequired tells Cobra that the flag is required, and prioritizes in completion if it's unset (e.g., ko apply <tab> prioritizes -f over --preserve-import-paths).

Audit flags we configure and see if there are any that would benefit from being marked this way. Check that the expected behavior is actually observed when shell completion is configured.

@imjasonh imjasonh added the good first issue Good for newcomers label Dec 14, 2021
@github-actions
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.

@imjasonh
Copy link
Member Author

I still want this.

@MohabMohamed
Copy link

Hello @imjasonh , is this issue still available?
I would love to work on it

@imjasonh
Copy link
Member Author

imjasonh commented May 9, 2022

Hello @imjasonh , is this issue still available? I would love to work on it

Go for it! Let me know if you have any questions, I'd be happy to help.

And thanks!

@MohabMohamed
Copy link

Thank you

@MohabMohamed
Copy link

@imjasonh I made the required change in PR #705, but are there any flags other than -f that need to be required?
as I didn't use ko before.

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

Successfully merging a pull request may close this issue.

2 participants