ko
ko copied to clipboard
Use Cobra flag helpers for better shell completion
Cobra has a helper methods which can make shell completion a little nicer:
-
MarkFlagFilename
tells Cobra that the flag represents a filename. This tells theko 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.
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.
I still want this.
Hello @imjasonh , is this issue still available? I would love to work on it
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!
Thank you
@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.