Closed sanfrancrisko closed 2 years ago
I've done some investigation into custom help and cobra today with some useful findings to summarize here:
prm help set puppet
will just work out of the box.prm exec describe puppetlabs/rubocop
- with some shared code leveraged to make the same functionality available in validate
.prm exec puppetlabs/rubocop --help
should return the help as surfaced by the tool or the help about the tool package is not obvious. I suggest instead that we go with the direction in point 2 above for surfacing information about the tool package.prm help
displays the help for the root prm command without any additional flags for help; those flags are visible if the user calls prm help help
but this is incredibly non-obvious. So while prm help --topic foo
is technically implementable I recommend we instead add an explain
subcommand which can read docs by topic etc.In summary:
exec
and validate
include a describe
subcommand which can surface the reference docs for that tool as packaged for PRMexplain
subcommand for surfacing topics written in markdown and sorted by topic/etcrubocop --help
in the container) via exec/validate without clobbering other information. Possibly simplest to do with a simple flag on the exec and validate commands.Resolved by https://github.com/puppetlabs/prm/pull/83
Implement the
pct help
subsystem. This should provide:Examples: