Fix help text for runnable plugin command
When creating a plugin without sub commands, the help text included the
command name (kubectl-plugin) instead of the display name (kubectl plugin):
Usage:
kubectl-plugin [flags]
The issue is that the usage line for this case does not use the
command path but the raw `Use` string, and this case was not tested.
Add a test for this case and fix UsageLine() to replace the command name
with the display name.
Tested using https://github.com/nirs/kubernetes/tree/sample-cli-plugin-help N
Nir Soffer committed
a73b9c391a9489d20f5ee1480e75d3b99fc8c7e2
Parent: df547f5
Committed by Marc Khouzam <marc.khouzam@gmail.com>
on 12/18/2023, 12:58:57 AM