Open hslatman opened 1 year ago
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.
See https://github.com/spf13/cobra/pull/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 asstep-kms-plugin
, if I understand correctly. Also applies to autocompletion and other related functionalities.