Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support usage text as plugin #109

Open
hslatman opened this issue Nov 6, 2023 · 1 comment
Open

Support usage text as plugin #109

hslatman opened this issue Nov 6, 2023 · 1 comment

Comments

@hslatman
Copy link
Member

hslatman commented Nov 6, 2023

See spf13/cobra#2018. This was added to v1.8.0. Might be useful for our plugin structure too.

E.g. usage text becomes step kms plugin if ran as step-kms-plugin, if I understand correctly. Also applies to autocompletion and other related functionalities.

@hslatman hslatman changed the title Support usage as plugin Support usage text as plugin Nov 7, 2023
@nirs
Copy link

nirs commented Nov 12, 2023

You can control the usage text and completions dynamically by annotating the root command. If the host command provide a hint when it runs the plugin (e.g. environment variable) you can annotate the root command only when running as a plugin.

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

No branches or pull requests

2 participants