docsgen-cli skips remaining subcommands if one has an empty line in its usage
masih opened this issue · 2 comments
masih commented
The docsgen-cli was originally written in Python as a way of automatically generate CLI docs by recursively running help on all sub commands. This was then ported over to Golang for faster execution without changing the logic.
The logic is imperfect: it makes imlicit assumptions about the pattern of usage printed. One of which is that If there exists an empty new line we have reached the end of sub commands for a given command. This implicit assumption breaks when usage of a subcommand contains newlines.