completion spec generated by golang Cobra package is unformatted
davidalpert opened this issue · comments
The fmt.Sprintf(...)
statements in https://github.com/withfig/autocomplete-tools/blob/main/packages/cobra/fig.go#L101-L211 have no line breaks.
As a result the completion spec which is generated is one long string which makes it difficult to debug.
I believe that adding explicit \n
characters into the format strings would result in much more readable and usable completion spec output.
If this is acceptable I would be happy to submit a pull request.
or maybe there is a typescript formatter that could autoformat this for me so the generated spec doesn't have to be concerned with indentation 🤔
I'll look for an offline solution.