Open jimschubert opened 2 years ago
If commands can have the slash in them I agree the doc gen should work as well.
It sounds like you've already done some digging into it so if you want to put up a PR and tag me I can review it.
Thanks for the issue!
@johnSchnake unfortunately, I'm not able to contribute the change as I've found this at work, and I'd have to go through a whole legal process to gain approval for the contribution.
Apologies for the error in transferring this issue to spf13/cobra-cli. The issue is about documentation generation, not code generation. I have transferred it back.
I just found out about GH's ability to transfer issues and I was trying to cleanup a bit.
@johnSchnake my rules at work changed such that I can contribute without legal approval as long as it's from my personal machine and on my own time.
I've added the support for markdown, manpages, rest, and yaml outputs in #1675.
Due to this line: https://github.com/spf13/cobra/blob/178edbb247f35e466578211dcf5f4892dbbd369b/doc/md_docs.go#L140
I'm unable to generate docs for one of my more complex commands. My subcommands directly match a string value known to my users which contains
/
. For instance:cobra doc generation occurs for the
run
command, but fails for thejob/first
subcommand with a message such as:I think a simple fix would be to include replacement of
/
with_
when determining the filenames.