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

Inconsistent shell completions for flags taking filename args #538

Open
scop opened this issue Jan 30, 2025 · 0 comments
Open

Inconsistent shell completions for flags taking filename args #538

scop opened this issue Jan 30, 2025 · 0 comments

Comments

@scop
Copy link

scop commented Jan 30, 2025

Shell completions for flags taking filename arguments are somewhat inconsistent across cosign with regards to how the suggested filenames are being filtered. Will file a PR to improve this.

scop added a commit to scop/cosign that referenced this issue Jan 30, 2025
Be more consistent across with extensions accepted/filtered, add some.

Also, mark and comment out cases where there are no known typical
filename extensions for flags taking filename arguments, to make it
obvious that they have not been inadvertently omitted. Marking a flag as
filename without specifying extensions is a no-op, and actually
considered a bug per commentary in cobra sources:
https://github.com/spf13/cobra/blob/41b26ec8bb59dfba580f722201bf371c4f5703dd/completions.go#L387-L390

Closes sigstore/community#538

Signed-off-by: Ville Skyttä <[email protected]>
scop added a commit to scop/cosign that referenced this issue Feb 9, 2025
Be more consistent across with extensions accepted/filtered, add some.

Also, mark and comment out cases where there are no known typical
filename extensions for flags taking filename arguments, to make it
obvious that they have not been inadvertently omitted. Marking a flag as
filename without specifying extensions is a no-op, and actually
considered a bug per commentary in cobra sources:
https://github.com/spf13/cobra/blob/41b26ec8bb59dfba580f722201bf371c4f5703dd/completions.go#L387-L390

Closes sigstore/community#538

Signed-off-by: Ville Skyttä <[email protected]>
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