step-kms-plugin icon indicating copy to clipboard operation
step-kms-plugin copied to clipboard

Support usage text as plugin

Open hslatman opened this issue 2 years ago • 1 comments

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 as step-kms-plugin, if I understand correctly. Also applies to autocompletion and other related functionalities.

hslatman avatar Nov 06 '23 12:11 hslatman

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.

nirs avatar Nov 12 '23 14:11 nirs